Class AbstractValidation

    • Constructor Detail

      • AbstractValidation

        public AbstractValidation()
    • Method Detail

      • getName

        public String getName()
        An unique name to identify the validation implementation
        Specified by:
        getName in interface Validation
      • setName

        public void setName​(String name)
      • addError

        public void addError​(String i18nKey,
                             String path)
        Add an error message (i18nKey) for a specific json path
        Parameters:
        i18nKey - the validation error message as a key to internationalize
        path - the json path that identify the wrong data in the submission. It could be as specific as a single value in a multivalued attribute or general of a "whole" section
      • getErrors

        public List<ErrorRest> getErrors()
        Expose the identified errors
        Returns:
        the list of identified ErrorRest