Interface IDataValidation

  • public interface IDataValidation
    Represents a validation rule of an entity (IMetaObject) for an attribute (IMetaPrimitive). Validation types are Required, EqualsTo, Length, Unique, RegEx and Range.
    • Method Detail

      • getMetaPrimitive

        IMetaPrimitive getMetaPrimitive()
        Returns the attribute this data validation belongs to.
        the attribute
      • getType

        default java.lang.String getType()
        since Mendix 8.12, use getValidationType()
        Returns the type of validation (Required, EqualsTo, Length, Unique, RegEx and Range).
        the validation type
      • isValid

        boolean isValid​(IContext context,
                        IMendixObject object,
                        java.lang.Object value)
        Returns whether the specified object satisfied this data validation.
        context - the context to use for accessing the attribute
        object - the Mendix object containing the attribute to validate
        value - the new value for the attribute to validate
        true if the specified object is valid, false otherwise