Support

Account

Home Forums ACF PRO Validating custom field values on saving post

Helping

Validating custom field values on saving post

  • Hi there,

    I made this thread last week: http://support.advancedcustomfields.com/forums/topic/field-validation-on-saving-a-post/

    Since I have not received an answer, I just went ahead and bought ACF Pro to check out the validate_value Filter. The documentation says “This filter allows you to perform custom validation on a field’s value and either allow or prevent the post from being saved.” To me it seems like the validation is only executed on publishing as well, am I missing something here? Also, for the validation I need a radio box to not have any default value, which doesn’t seem to be possible anymore, or is it?

    Thanks in advance!

  • Hi @fabian

    Please keep in mind this is a community forum, not a support desk. If you wish for one on one support, please email us here: http://support.advancedcustomfields.com/

    As for you question, the radio button is not a type of input which can allow a null value. It was a mistake for it to ever allow such behavior.

    The acf/validate_value filter can be used on any value to return a customized validation result which is performed on submission of the post and displayed via AJAX.

    Does that help?

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Validating custom field values on saving post’ is closed to new replies.