Support

Account

Home Forums Backend Issues (wp-admin) validate_value not working in update

Solving

validate_value not working in update

  • Goodmorning,

    I’m having issues with the validate_value filter. We are using ACF PRO.

    When i’m creating the post and I have set the google maps on a state where it shouldn’t be it gives the correct error message and it will stop saving to the database. This works great!

    Problem:
    But when i’m not creating but updating the post it is not giving us the error message and continues to just save it to the database. It is weird because when i’m printing it to the log, it is passing the validate_value filter but it will not give us the error message.

    The same problem occurs on a different post type.

    We are also using acf forms and when creating or updating the post it gives us the right error message and stops the saving to the database. It only happens in the back-end when updating.

    Do you know a solution to this problem?
    We are only using acf/validate_value/key= in our project.

  • I’m not sure, but it appears that the value on update is different than the value on a new post.

    You will need to find out what is being submitted. You can probably output the submitted value using error_log().

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

You must be logged in to reply to this topic.