redaxo/redaxo — Issue #17: RFC Rex-Var validation
Author: staabm
Created: 2011-11-27 11:09:43+00:00
State: open

RFC / Request for comments. Ths issue is meant to discuss a feature which may be added in a future redaxo version...

Rex-Var based validation means that you are able to validate user input using a Rex-Var itself instead of using Rex-Actions. This approach should only handle most common use-cases and is not meant to handle very complex scenarios.

New Rex-Var properties: (only for input vars)
"required", used to define that the Rex-Var is not allowed to be empty
"validate", validiate simple types (numeric, alpha, float, int,???)
"pattern", validate the input against a RegEx e.g. "\d\.\d"

When validation of the user input of a var fails, the corresponding input will be rendered with an attached css class "invalid". A Slice will not be saved/updated until all validation passes.