InsolvencyService/wader — pull request #26 by samsquire (2014-02-18 16:29:09+00:00)
Title: Validation across multiple pages + schema refactorings

On the end date page, we need to validate against the start date. We make use of the 'state' parameter on FormEncode's _to_python method to pass data for use by the validator.

We use a pipeline of validators for the end date page:

DateValidator() -> DateRangeValidator()

DateValidator passes a parsed date through - if it fails, we won't do any range validations. The DateRangeValidator takes the parsed end date and compares it to the 'new_job_end' from the draft. (This will need to be refactored.)

We need to move away from 'conversions.py' and use formencode for the _to_python and back again from python. (We're currently duplicating formencode!)

We are currently breaking on the lack of new_job_start not being in the hstore. We're about to fix this now.