Hello,
Thanks for the feedback!
It looks like you have an “Advanced Validation” setting defined in your Field Settings (See documentation). Also, it seems like you selected a function (for example: is_email(value)
, count(value)
etc…) that is not compatible with the value sent by ACF.
I would recommend to check the “Advanced Validation” setting of the Fields displayed on your Post, using the ACF UI. Then check the function you selected, see if it is correct. See screenshot.
If the selected function is not compatible with the value sent by the field with ACF, it will trigger an error, like here. In your case, it looks like you try to “count” a value that cannot be counted by PHP. Specifically, you try to count a “text” value (instead of an array for example). To count a text value in PHP you have to use strlen()
, which is the “If value length strlen(value)” option in the “Advanced Validation” setting.
Generally speaking, before using these functions, I would recommend to check their documentation, and make sure they are compatible with the value sent by ACF with the related field. For example, the ACF Textarea field will return a string
, the ACF Checkbox will return an array
etc…
Let me know if you found something!
Have a nice day!
Regards.