On 7/5/2011 3:00 PM, Adam Young wrote:
1. The validation process should stop after finding the first problem.
So the validate_integers() needs to return a value which is then
checked by validate() to determine if it should continue.
Not really necessary.

The validation is still correct, but subsequent checking will be redundant. This is no longer an issue in this patch because the pattern checking is moved into meta_validate(). But suppose we have additional checkings after meta_validate() they could be redundant. We'll address that when that actually happens.

2. This is actually an existing problem, so it can be addressed later.
If a widget only has a metadata but not param_info (not sure if this
ever happens) it will only execute integer validation but not the
pattern validation. The metadata and param_info are actually the same
thing so we should be able to merge them, but it might require
significant changes.

There is still an issue in validate(), the required flag is only checked if param_info is available (which is probably always the case). Ideally the param_info should be renamed into metadata, thus avoiding multiple validations as well. This can be addressed later.

ACK and pushed to master.

Endi S. Dewata

Freeipa-devel mailing list

Reply via email to