ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Why your custom form validation rule might not be running

November 28, 2012 8:54am

Subscribe [1]
  • #1 / Nov 28, 2012 8:54am

    bientek

    26 posts

    For future reference to others: two common reasons you custom form validation callback functions might not run:
    1. Your callback is in a library, instead of a controller or MY_Form_validation, where it belongs
    2. The form field for your callback is empty: your callback will not run if in MY_Form_validation; instead, use the built-in ‘required’ function

    Hope to save hours of debugging for others. The 2nd issue was very subtle, since my callback worked inside a controller, up until it was moved to MY_Form_validation.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases