Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Nohemi

Validate ACF field ?

Hi
(Yes, it’s me again who test your plugin a lot with ACF ^^)

Apparently, Admin Columns “inline edit” doesn’t use ACF validation filters like : https://www.advancedcustomfields.com/resources/acf-validate_value/

There is a reason ?

How i can validate an “inline edit” field ?

Thank you

7 years, 5 months ago
Stefan van den Dungen Gronovius
Developer

Hi Nohemi,

First of all, thank you very much for all your feedback, very helpful!
Our product only offers client side validation for inline edit.
So we can do some validation like: required, email, date etc, but unfortunately we cannot do any server side validation.

I did a quick look at the code and we use the update_field to store the ACF value. When I follow this ACF function, it turns out the that the validation filter is never called. So if we’re going to support this we have to tackle the following things

– Way to do server side validation in our inline edit functionality
– Look for a way to implement the ACF validation filters

I’ve create a ticket for this and put it on the backlog
https://github.com/codepress/admin-columns-issues/issues/627

7 years, 5 months ago
Nohemi

Thank you :)

For the moment i do my validation inside “acf/update_value” filter. I don’t save the value if it is incorrect. Not perfect (no error message) but at least, i can prevent people to save bad value.

7 years, 5 months ago
Stefan van den Dungen Gronovius
Developer

Hi Nohemi,

I understand the flow, next step is to show some kind of validation on the front end.

7 years, 5 months ago

You must be logged in to reply to this topic.