mirror of
https://github.com/sismics/docs.git
synced 2025-12-13 01:36:18 +00:00
rename
This commit is contained in:
@@ -154,7 +154,7 @@ public class ValidationUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void validateUsernamepattern(String s, String name) throws ClientException {
|
public static void validateUsername(String s, String name) throws ClientException {
|
||||||
if (!USERNAME_PATTERN.matcher(s).matches()) {
|
if (!USERNAME_PATTERN.matcher(s).matches()) {
|
||||||
throw new ClientException("ValidationError", MessageFormat.format("{0} must have only alphanumeric, underscore characters or @ and .", name));
|
throw new ClientException("ValidationError", MessageFormat.format("{0} must have only alphanumeric, underscore characters or @ and .", name));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ public class UserResource extends BaseResource {
|
|||||||
|
|
||||||
// Validate the input data
|
// Validate the input data
|
||||||
username = ValidationUtil.validateLength(username, "username", 3, 50);
|
username = ValidationUtil.validateLength(username, "username", 3, 50);
|
||||||
ValidationUtil.validateUsernamepattern(username, "username");
|
ValidationUtil.validateUsername(username, "username");
|
||||||
password = ValidationUtil.validateLength(password, "password", 8, 50);
|
password = ValidationUtil.validateLength(password, "password", 8, 50);
|
||||||
email = ValidationUtil.validateLength(email, "email", 1, 100);
|
email = ValidationUtil.validateLength(email, "email", 1, 100);
|
||||||
Long storageQuota = ValidationUtil.validateLong(storageQuotaStr, "storage_quota");
|
Long storageQuota = ValidationUtil.validateLong(storageQuotaStr, "storage_quota");
|
||||||
|
|||||||
Reference in New Issue
Block a user