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.
|
||||
/// or
|
||||
/// Invalid username. Please only use letters, numbers, and/or dashes and between 1-20 characters.
|
||||
/// or
|
||||
/// Invalid password.
|
||||
/// </exception>
|
||||
/// <exception cref="PocketException"></exception>
|
||||
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.");
|
||||
}
|
||||
|
||||
if (password.Length < 3)
|
||||
{
|
||||
throw new FormatException("(3) Invalid password.");
|
||||
}
|
||||
|
||||
RegisterParameters parameters = new RegisterParameters()
|
||||
{
|
||||
Username = username,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<authors>$author$</authors>
|
||||
<owners>$author$</owners>
|
||||
<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>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<description>PocketSharp is a C#.NET portable class library that integrates the Pocket API v3.</description>
|
||||
|
||||
Reference in New Issue
Block a user