public interface IValidator
| Modifier and Type | Method and Description |
|---|---|
Map<String,List<IValidationError>> |
getErrors()
Gets the validation errors.
|
List<IValidationError> |
getErrors(String fieldName)
Gets the validation errors for the specified field.
|
String |
getErrorsFormatted(FormatType formatType)
Gets the formatted errors, if there are any.
|
String |
getErrorsFormatted(String fieldName,
FormatType formatType)
Gets the formatted errors of a specific field, if there are any.
|
boolean |
isValid()
Is the object valid?
|
void |
revalidate()
Revalidates the object.
|
boolean isValid()
void revalidate()
Map<String,List<IValidationError>> getErrors()
If the validation hasn't been called yet, calls it.
List<IValidationError> getErrors(String fieldName)
If the validation hasn't been called yet, calls it.
String getErrorsFormatted(FormatType formatType)
If the validation hasn't been called yet, calls it.
formatType - The type of output for the errors (Text, HTML, Json or XML).null if
there are no validation errors.String getErrorsFormatted(String fieldName, FormatType formatType)
If the validation hasn't been called yet, calls it.
fieldName - The field to get errors for.formatType - The type of output for the errors (Text, HTML, Json or XML).null if
there are no validation errors.Copyright © 2016. All rights reserved.