Home » HTML » HTML_QuickForm » Bug #6577
Ability to return error message from validation function
Details
| Request #6577 | Ability to return error message from validation function |
|---|---|
| Submitted | 2006-01-25 12:27 UTC |
| From | yee at celtware dot com |
| Status | Wont fix |
| Package | HTML_QuickForm |
| PHP Version | Irrelevant |
| OS | Irrelevent |
| Roadmaps | (Not assigned) |
Comments
[2006-01-25 12:27 UTC] yee at celtware dot com
Description:
------------
A failure reason could be returned from the validation function rather than having to hard-code it in.
Test script:
---------------
// function that would check the strength of
// a given password and return the reason why
// it was rejected
Function isStrongPassword ($name, $value) {
if (!crack_check($value)) {
return crack_getlastmessage();
}
return true;
}