Validation of Request Parameters Design Discussion
Bug 5275
Validation scoping of work items
- ZRM: Constrain the problem to ZRM based applications for initial proof of concept
- Application Builder: Integrate with the Application Builder page editor used when creating forms
- Dojo: Embrace the JSON schema for Dojo Data.
- Validation : Server side validation of models data
- Programmatic API : Server side filtering, validation and escaping of input data
Zero Resource Model (ZRM)
There are two pieces of work associated with the leveraging the ZRM schema/model design for request parameter validation.
- Promotion of key functionality from ZRM into zero.core for validation of data against a model
- Integrate more closely with JSON Schema for the definition of the ZRM model.
- JSON Schema has a pattern property which follows ECMA-262/Perl5 regular expression semantics.
Application Builder
Enhancements remain to to the Visual Page Editor for Data Binding between DataSource/Schema (ZRM) and Widgets on a page.
DataBinding
Dojo
Work with community to determine if JSON Schema is the right choice for validating data for Dojo Data (we think the answer is yes)
- Add functionality to be able to obtain the schema from the data store
- Add the ability to call validate on the data for client side validation (either during Write or post-Write)
Dijits already have a fairly rich set of validation/filtering on the client. We need to
fully understand its capabilities and how it dovetails with server side
validation:
http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/form/test_validate.html
Note also that a JSON data structure can be easily extracted programmatically in JavaScript for a