@Handler(supports=User.class, order=50) public class UserValidator extends java.lang.Object implements org.springframework.validation.Validator
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
log
Log for this class and subclasses
|
Constructor and Description |
---|
UserValidator() |
Modifier and Type | Method and Description |
---|---|
boolean |
isUserNameAsEmailValid(java.lang.String username)
Returns true if the given username is a valid e-mail.
|
boolean |
isUserNameValid(java.lang.String username)
Convenience method to check the given username against the regular expression.
|
boolean |
supports(java.lang.Class c)
Determines if the command object being submitted is a valid type
|
void |
validate(java.lang.Object obj,
org.springframework.validation.Errors errors)
Checks the form object for any inconsistencies/errors
|
protected final org.apache.commons.logging.Log log
public boolean supports(java.lang.Class c)
supports
in interface org.springframework.validation.Validator
Validator.supports(java.lang.Class)
public void validate(java.lang.Object obj, org.springframework.validation.Errors errors)
validate
in interface org.springframework.validation.Validator
Validator.validate(java.lang.Object,
org.springframework.validation.Errors)
public boolean isUserNameValid(java.lang.String username)
username
- the username string to checkpublic boolean isUserNameAsEmailValid(java.lang.String username)
username
- Copyright © 2018 OpenMRS Inc.. All Rights Reserved.