public class StringValidator extends JsfValidator<String>
StringValidator class is most common JSF validator for text
fields.| Constructor and Description |
|---|
StringValidator(javax.faces.context.FacesContext context,
javax.faces.component.UIInput input,
String value) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkLength(int min,
int max,
String resourceId)
Checks field's length.
|
boolean |
checkLength(int min,
int max,
String resourceId,
Object... params)
Checks field's length.
|
boolean |
checkRegexp(String regexp,
String resourceId)
Checks field's length.
|
boolean |
checkRegexp(String regexp,
String resourceId,
Object... params)
Checks field's length.
|
checkEquals, checkEquals, checkExists, checkExists, getContext, getInput, getMessages, getValue, sendError, sendErrorpublic StringValidator(javax.faces.context.FacesContext context,
javax.faces.component.UIInput input,
String value)
context - contextinput - inputvalue - valuepublic boolean checkLength(int min,
int max,
String resourceId)
min - min lengthmax - max lengthresourceId - message idtrue if check is successfulpublic boolean checkLength(int min,
int max,
String resourceId,
Object... params)
min - min lengthmax - max lengthresourceId - message idparams - additional parameterstrue if check is successfulpublic boolean checkRegexp(String regexp, String resourceId)
regexp - regular expressionresourceId - message idtrue if check is successfulCopyright © 2013 TFI branch of Engels Instutute of Technology. All Rights Reserved.