Class ValidationErrorUtil
java.lang.Object
fr.paris.lutece.util.beanvalidation.ValidationErrorUtil
ValidationError Utils
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetFieldId(jakarta.validation.ConstraintViolation constraintViolation, ValidationErrorConfig config, Locale locale) Return the attribute name as field identifierstatic StringgetFieldname(jakarta.validation.ConstraintViolation constraintViolation, ValidationErrorConfig config, Locale locale) Return the field name as it will appear in the messagestatic StringgetValue1(jakarta.validation.ConstraintViolation constraintViolation, ValidationErrorConfig config) Return the attribute's value to set as the value#1 of the messagestatic StringgetValue2(jakarta.validation.ConstraintViolation constraintViolation, ValidationErrorConfig config) Return the attribute's value to set as the value#2 of the message
-
Method Details
-
getValue1
public static String getValue1(jakarta.validation.ConstraintViolation constraintViolation, ValidationErrorConfig config) Return the attribute's value to set as the value#1 of the message- Parameters:
constraintViolation- The Constraint violationconfig- The config- Returns:
- The value
-
getValue2
public static String getValue2(jakarta.validation.ConstraintViolation constraintViolation, ValidationErrorConfig config) Return the attribute's value to set as the value#2 of the message- Parameters:
constraintViolation- The Constraint violationconfig- The config- Returns:
- The value
-
getFieldname
public static String getFieldname(jakarta.validation.ConstraintViolation constraintViolation, ValidationErrorConfig config, Locale locale) Return the field name as it will appear in the message- Parameters:
constraintViolation- The Constraint violationconfig- The configlocale- The locale- Returns:
- The field name
-
getFieldId
public static String getFieldId(jakarta.validation.ConstraintViolation constraintViolation, ValidationErrorConfig config, Locale locale) Return the attribute name as field identifier- Parameters:
constraintViolation- The Constraint violationconfig- The configlocale- The locale- Returns:
- The field name
-