Interface ValidatorTypeAdapter

All Known Implementing Classes:
DocumentValidatorTypeAdapter, DoubleValidatorTypeAdapter, EmailValidatorTypeAdapter, IdentifierValidatorTypeAdapter, ImageValidatorTypeAdapter, IntegerValidatorTypeAdapter, LinkValidatorTypeAdapter, PasswordValidatorTypeAdapter, PercentValidatorTypeAdapter, PhoneValidatorTypeAdapter, PostcodeValidatorTypeAdapter, SerialValidatorTypeAdapter, StringValidatorTypeAdapter, TextValidatorTypeAdapter, UrlValidatorTypeAdapter

public interface ValidatorTypeAdapter
Type adapter for contributing data type specific validation rules.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable List<Validator>
    These validation rules are enforced no matter what.
    @Nullable List<Validator>
    These validation rules are added as fallbacks, for the case that there is nothing else defined.
  • Method Details

    • getDefaults

      @Nullable @Nullable List<Validator> getDefaults()
      These validation rules are added as fallbacks, for the case that there is nothing else defined.

      For example the "string" type may define a max-length of 255, which can be explicitly set to more or less, in which case the setting from here has to be ignored.

    • getConstraints

      @Nullable @Nullable List<Validator> getConstraints()
      These validation rules are enforced no matter what. These define maximum boundaries.

      For example the "byte" type has a max value of 127. Yes, a larger value cannot be stored in a byte data type anyway, but this information is retrieved by other parts of the application, for example the gui, to set boundaries.