Home > @polyspec/crudui-validator > ValidateSlot
ValidateSlot interface
Validation rules (SPEC §3 slots.validate). Each value may be an expression/condition map, expressing conditional validation without a separate key (e.g. required: '.subscribe', email: true) — the condition is the value's expression (G1), never a separate key.
The named members are every built-in rule, with the parameter shapes the meta-schema declares; false or null disables a rule. equalTo, containedIn, typeFrom, minFrom, maxFrom, notEqual, unique, enddate, reference, accept, match, pattern, in and conditionTree receive their parameter unchanged, so they take no condition map. No other rule name exists: the meta-schema rejects it and the runtime fails the load with UNKNOWN_RULE.
Signature:
export interface ValidateSlot
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
string | string[] | false | null |
(Optional) Accepted file extensions or MIME types. | ||
|
true | 'judge' | false | null |
(Optional) A condition tree; | ||
|
string | false | null |
(Optional) Field whose string value must contain the string value (CUVR-075). | ||
|
Evaluated<boolean | null> |
(Optional) Requires a valid date when enabled. | ||
|
Evaluated<boolean | null> |
(Optional) Requires a YYYY-MM-DD date when enabled. | ||
|
Evaluated<boolean | null> |
(Optional) Requires digits only when enabled. | ||
|
Evaluated<boolean | null> |
(Optional) Requires a syntactically valid email address when enabled. | ||
|
string | false | null |
(Optional) Start-date field the end date must not precede. | ||
|
string | false | null |
(Optional) Field whose value must be equal. | ||
|
string | Array<string | number | boolean | null> | Array<ChoicePair | ChoiceGroup> | Record<string, LangMap | string | null> | false | null |
(Optional) Allowed values: comma-separated string, list, choice list with groups, or value-to-label map. | ||
|
string | false | null |
(Optional) Regular expression the value must match. | ||
|
Evaluated<number | false | null> |
(Optional) Numeric upper bound. | ||
|
Evaluated<number | false | null> |
(Optional) Maximum collection size. | ||
|
string | false | null |
(Optional) Field whose value is the inclusive upper bound of the value (CUVR-079). | ||
|
Evaluated<number | false | null> |
(Optional) Maximum string length. | ||
|
Evaluated<number | false | null> |
(Optional) Numeric lower bound. | ||
|
Evaluated<number | false | null> |
(Optional) Minimum collection size. | ||
|
string | false | null |
(Optional) Field whose value is the inclusive lower bound of the value (CUVR-079). | ||
|
Evaluated<number | false | null> |
(Optional) Minimum string length. | ||
|
string | number | boolean | null |
(Optional) Dot-prefixed field reference or literal value the input must differ from. | ||
|
Evaluated<boolean | null> |
(Optional) Requires a finite number when enabled. | ||
|
string | false | null |
(Optional) Same rule as | ||
|
Evaluated<[number, number] | false | null> |
(Optional) Numeric lower and upper bounds. | ||
|
Evaluated<[number, number] | false | null> |
(Optional) Minimum and maximum string length. | ||
|
string | false | null |
(Optional) Declaration path of the field whose values are the ids the value must name. | ||
|
Evaluated<boolean | null> |
(Optional) Requires a supplied, nonempty value when enabled. | ||
|
Evaluated<number | false | null> |
(Optional) Numeric increment. | ||
|
string | false | null |
(Optional) Field whose value names the type of the value: bool, int or enum (CUVR-077). | ||
|
boolean | string | null |
(Optional) Uniqueness; a string names an item field or a filter condition. | ||
|
Evaluated<boolean | null> |
(Optional) Requires a valid URL when enabled. |