Hi Carl, a few days ago I posted a Dynamic constraint with the idea of a constraining a textfield depending on the value of a different field, e. g. a select field.
Today I needed to constrain many textfields depending on a radiogroup, as this radiogroup decides which fields needs to be filled, so I could put a required constraint on these fields. This bought me to the idea of extending 'process' in constraint and _others class (these are the base classes for al constraints) with a 'when' accessor and the code to only run the constraint when a specific field contains a given value (or the value is in a given range). I would suggest the following structure: - Required when: - field: name - value: 1 or - values: [ 2, 4, 6 ] What do you think? Greets, Mario _______________________________________________ HTML-FormFu mailing list HTML-FormFu@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu