Class ValidatorMandatory

    • Constructor Detail

      • ValidatorMandatory

        public ValidatorMandatory()
        The constructor.
    • Method Detail

      • get

        public static ValidatorMandatory get()
        Returns:
        the singleton instance of this class.
      • validateNotNull

        protected NlsMessage validateNotNull​(Object value)
        Description copied from class: AbstractValueValidator
        This method performs the validation in case value is NOT null. This method contains the actual custom logic for the validation. It is therefore designed in a way that makes it most simple to implement custom validators.
        Specified by:
        validateNotNull in class AbstractValueValidator<Object>
        Parameters:
        value - the value to validate.
        Returns:
        the failure message or null if the the given value is valid.
      • isMandatory

        public final boolean isMandatory()
        Returns:
        true if this is a validator for mandatory fields (that will not accept null or empty values), false otherwise.