PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » HTML » HTML_QuickForm » Bug #6577

Ability to return error message from validation function

Details

Request #6577Ability to return error message from validation function
Submitted2006-01-25 12:27 UTC
Fromyee at celtware dot com
StatusWont fix
PackageHTML_QuickForm
PHP VersionIrrelevant
OSIrrelevent
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;
}