Class ValidationErrorUtil


  • public final class ValidationErrorUtil
    extends java.lang.Object
    ValidationError Utils
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getFieldId​(javax.validation.ConstraintViolation constraintViolation, ValidationErrorConfig config, java.util.Locale locale)
      Return the attribute name as field identifier
      static java.lang.String getFieldname​(javax.validation.ConstraintViolation constraintViolation, ValidationErrorConfig config, java.util.Locale locale)
      Return the field name as it will appear in the message
      static java.lang.String getValue1​(javax.validation.ConstraintViolation constraintViolation, ValidationErrorConfig config)
      Return the attribute's value to set as the value#1 of the message
      static java.lang.String getValue2​(javax.validation.ConstraintViolation constraintViolation, ValidationErrorConfig config)
      Return the attribute's value to set as the value#2 of the message
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getValue1

        public static java.lang.String getValue1​(javax.validation.ConstraintViolation constraintViolation,
                                                 ValidationErrorConfig config)
        Return the attribute's value to set as the value#1 of the message
        Parameters:
        constraintViolation - The Constraint violation
        config - The config
        Returns:
        The value
      • getValue2

        public static java.lang.String getValue2​(javax.validation.ConstraintViolation constraintViolation,
                                                 ValidationErrorConfig config)
        Return the attribute's value to set as the value#2 of the message
        Parameters:
        constraintViolation - The Constraint violation
        config - The config
        Returns:
        The value
      • getFieldname

        public static java.lang.String getFieldname​(javax.validation.ConstraintViolation constraintViolation,
                                                    ValidationErrorConfig config,
                                                    java.util.Locale locale)
        Return the field name as it will appear in the message
        Parameters:
        constraintViolation - The Constraint violation
        config - The config
        locale - The locale
        Returns:
        The field name
      • getFieldId

        public static java.lang.String getFieldId​(javax.validation.ConstraintViolation constraintViolation,
                                                  ValidationErrorConfig config,
                                                  java.util.Locale locale)
        Return the attribute name as field identifier
        Parameters:
        constraintViolation - The Constraint violation
        config - The config
        locale - The locale
        Returns:
        The field name