1
Vote

Split the current general 'rule' (soon to be called validator) into value and state validators

description

The current rule (soon to be called validator) currently requires knowlege of the parent objects state when validating. This is not required for many scenarios and, infact, makes client side scenarios much more difficult. To make it easier for consumers to implement thier own validators, and for the framework to support client-side validation, make a distinction between 2 types of validation: state and value. StateValidators will have access to the parent object's instance in the validate method. Value validators will only have access to the value being validated.

comments