Validators
Validators are registered with the validators
extension. The validators extension accepts an array of validators where the key is the name of the validator and the value a callback function that receives the value as parameter and returns a boolean.
In your templates, you can now check if the value is in the given array of green values: