JFormRule, the base class for our form rule classes, documents the test() method as returning a boolean indicating whether a form field's value passes a rule. JFormRuleCaptcha returns an Exception instance if JCaptcha::checkAnswer() returns a value that would be evaluated as false. This form rule should be updated to follow the documented API.
The documented API is that a boolean is returned, so that should be it. If we decide we want to change the API, that's another discussion (IMO it'd probably be more useful to throw Exceptions with a real error stack versus return boolean false here, but I don't know if that's something that can be done within the scope of the B/C rules).
| Labels |
Added:
?
|
||
| Category | ⇒ | Libraries |
| Status | New | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-10-30 18:12:32 |
| Closed_By | ⇒ | mbabker |
Is this good enough:
or we need to pass the error as well?