require password in RegisterAccount to be at least 3 chars long
This commit is contained in:
@@ -126,6 +126,8 @@ namespace PocketSharp
|
|||||||
/// Invalid email address.
|
/// Invalid email address.
|
||||||
/// or
|
/// or
|
||||||
/// Invalid username. Please only use letters, numbers, and/or dashes and between 1-20 characters.
|
/// Invalid username. Please only use letters, numbers, and/or dashes and between 1-20 characters.
|
||||||
|
/// or
|
||||||
|
/// Invalid password.
|
||||||
/// </exception>
|
/// </exception>
|
||||||
/// <exception cref="PocketException"></exception>
|
/// <exception cref="PocketException"></exception>
|
||||||
public async Task<bool> RegisterAccount(string username, string email, string password)
|
public async Task<bool> RegisterAccount(string username, string email, string password)
|
||||||
@@ -148,6 +150,11 @@ namespace PocketSharp
|
|||||||
throw new FormatException("(2) Invalid username. Please only use letters, numbers, and/or dashes and between 1-20 characters.");
|
throw new FormatException("(2) Invalid username. Please only use letters, numbers, and/or dashes and between 1-20 characters.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (password.Length < 3)
|
||||||
|
{
|
||||||
|
throw new FormatException("(3) Invalid password.");
|
||||||
|
}
|
||||||
|
|
||||||
RegisterParameters parameters = new RegisterParameters()
|
RegisterParameters parameters = new RegisterParameters()
|
||||||
{
|
{
|
||||||
Username = username,
|
Username = username,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<authors>$author$</authors>
|
<authors>$author$</authors>
|
||||||
<owners>$author$</owners>
|
<owners>$author$</owners>
|
||||||
<licenseUrl>https://raw.github.com/ceee/PocketSharp/master/LICENSE-MIT</licenseUrl>
|
<licenseUrl>https://raw.github.com/ceee/PocketSharp/master/LICENSE-MIT</licenseUrl>
|
||||||
<projectUrl>http://pocketsharp.frontendplay.com</projectUrl>
|
<projectUrl>https://github.com/ceee/PocketSharp</projectUrl>
|
||||||
<iconUrl>https://raw.github.com/ceee/PocketSharp/master/pocketsharp.png</iconUrl>
|
<iconUrl>https://raw.github.com/ceee/PocketSharp/master/pocketsharp.png</iconUrl>
|
||||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
<description>PocketSharp is a C#.NET portable class library that integrates the Pocket API v3.</description>
|
<description>PocketSharp is a C#.NET portable class library that integrates the Pocket API v3.</description>
|
||||||
|
|||||||
Reference in New Issue
Block a user