Class QFrontendFieldValidation
java.lang.Object
com.kingsrook.qqq.backend.core.model.metadata.frontend.QFrontendFieldValidation
- All Implemented Interfaces:
Serializable
The validation rules of a field, in one place, as the backend enforces them
on insert and update - so a client (web, CLI, TUI, native) can check a value
before saving. The server stays the authority: a rule not stated here is
never assumed by a client.
- required: a value is required (isRequired).
- maxLength + tooLongBehavior: ERROR refuses a longer value; TRUNCATE and
TRUNCATE_ELLIPSIS trim it on save; PASS_THROUGH (or absent) does neither.
- minValue / maxValue (+ minInclusive / maxInclusive): a value outside is
refused (only ranges whose behavior is ERROR; CLIP ranges are not listed).
- pattern (+ patternMessage): a non-empty value must match the whole
regular expression (ValuePatternBehavior).
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGetter for maxInclusiveGetter for maxLengthGetter for maxValueGetter for minInclusiveGetter for minValueGetter for patternGetter for patternMessageGetter for requiredGetter for tooLongBehaviorstatic QFrontendFieldValidationof(QFieldMetaData field) The rules of a field, or null when it has none.
-
Constructor Details
-
QFrontendFieldValidation
public QFrontendFieldValidation()
-
-
Method Details
-
of
The rules of a field, or null when it has none. -
getRequired
Getter for required -
getMaxLength
Getter for maxLength -
getTooLongBehavior
Getter for tooLongBehavior -
getMinValue
Getter for minValue -
getMinInclusive
Getter for minInclusive -
getMaxValue
Getter for maxValue -
getMaxInclusive
Getter for maxInclusive -
getPattern
Getter for pattern -
getPatternMessage
Getter for patternMessage
-