Class ValidationError

java.lang.Object
org.hawaiiframework.validation.ValidationError

public class ValidationError extends Object
Encapsulates a validation error.
Since:
2.0.0
See Also:
  • Constructor Details

    • ValidationError

      public ValidationError(String code)
      Constructs a new ValidationError with the supplied error code.
      Parameters:
      code - the error code
    • ValidationError

      public ValidationError(String field, String code)
      Constructs a new ValidationError with the supplied field name and error code.
      Parameters:
      field - the field name
      code - the error code
  • Method Details

    • getField

      public String getField()
      Returns the field name or null.
      Returns:
      the field name or null
    • getCode

      public String getCode()
      Returns the error code.
      Returns:
      the error code
    • toString

      public String toString()
      Overrides:
      toString in class Object