If I have a select list that allows multiple selections, or a check box on a form, and both are empty at the time of submission, the validation framework is throwing and error because they are defined in the config but they don’t exist in the RC.
The key requested ‘FormField’ does not exist in the collection
The valid keys are event,ID,FIELDNAMES,NAMESPACEROUTING,NAMESPACE
Does it make sense to have the validation framework first check for the existence of the form field, and if it’s not there param it and treat it as an empty string?
I don’t know if anyone is watching this old thread.
It shouldn’t param the value, but if a required value is missing from the request collection then it should give you a validation error when you call validateModel rather than throwing a “key requested does not exist in the collection”. It should check the defined fields in the config against the request collection, not the other way around. A missing value should be considered something that the user failed to enter in this case.