PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

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;
}