Package org.hawaiiframework.validation
Class ValidationError
- java.lang.Object
-
- org.hawaiiframework.validation.ValidationError
-
public class ValidationError extends Object
Encapsulates a validation error.- Since:
- 2.0.0
- Author:
- Marcel Overdijk
- See Also:
Validator,ValidationResult
-
-
Constructor Summary
Constructors Constructor Description ValidationError(String code)Constructs a newValidationErrorwith the supplied error code.ValidationError(String field, String code)Constructs a newValidationErrorwith the supplied field name and error code.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCode()Returns the error code.StringgetField()Returns the field name ornull.StringtoString()
-
-
-
Constructor Detail
-
ValidationError
public ValidationError(String code)
Constructs a newValidationErrorwith the supplied error code.- Parameters:
code- the error code
-
ValidationError
public ValidationError(String field, String code)
Constructs a newValidationErrorwith the supplied field name and error code.- Parameters:
field- the field namecode- the error code
-
-