Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-6393

CRM_Core_Form::validate returns incorrectly

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.1.3, 3.1.4, 3.1.5
    • Fix Version/s: 3.2
    • Component/s: None
    • Labels:
      None

      Description

      Using hook_civicrm_validate, a developer could unset validation errors, but the form will still not pass to submit to submission because CRM_Core_Form::validate() returns an out-dated value.

      Instead, the function return in the same way as it's parent, by checking the count of _errors. See HTML_Quickform::validate().

      The attached one-line patch fixes this, and makes hook_civicrm_validate immensely more useful.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              mchapman2000 Matt Chapman
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 10 minutes
                10m
                Remaining:
                Remaining Estimate - 10 minutes
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified