Built-in declarative rules
Provide ready-made rules such as required, min, max, minLength, maxLength, pattern, email, integer and oneOf. Each rule is configured with plain objects. Developers can cover common cases without writing functions, and all rules produce consistent error keys and localizable messages.
Planned. This page shows the specification from issue #195. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
Employee grid where several rows are seeded with an invalid email, a missing name or an out-of-range age.
Expected behavior
Seeded invalid cells are flagged on load. Switching the locale updates the messages without re-running validation. A custom template such as '{field} must be at least {min}' is interpolated correctly.
Planned API surface
columns[].rulesWarValidators.requiredWarValidators.patternWarValidators.oneOfvalidationMessageslocaleAcceptance criteria
- Each built-in rule has a documented error key and parameters. (pending)
- Messages resolve in this order: column override, then grid validationMessages, then the locale default. (pending)
- Rules and function validators can be combined, and their errors are merged. (pending)
- The 'required' rule treats whitespace-only strings as empty when trim is enabled. (pending)