Open edjafarov opened 13 years ago
For any attribute in controller we should be able to put annotation that defines how this attribute should be validated. for example:
function exampleController(request, response, /** @validate(NotNull, IsNumber) */someAttribute){ }
Also it should be possible to create custom validators:
function exampleController(request, response, /** @validate(RigtDateFormat) */someAttribute){ }
The creation of such custom validators will be fairly simple:
/** * @AssignValidator( id="RightDateFormat") */ function RightDateValidator(param){ /* some validation function, probably asyncronous */ this.doNext(true/false); }
Only question opened is how to handle errors?
For any attribute in controller we should be able to put annotation that defines how this attribute should be validated. for example:
Also it should be possible to create custom validators:
The creation of such custom validators will be fairly simple:
Only question opened is how to handle errors?