• Resolved CrazySerb

    (@crazyserb)


    For some reason on WP5 a simple text field added to pages/posts now throws this error when trying to publish a post/page:

    “Validation Failed – Value must not exceed -4 characters”

    https://prntscr.com/mm03gr
    https://prntscr.com/mm02us

    Seems like something in WP5 is breaking the core functionality of this plugin, and we have no choice but to disable it until you guys fix it and publish a WP5 compatible plugin.

    Anyone know if there is a quick fix for this one, specific section of the code where that might be applied, without us having to wait for weeks or more for the updated version of plugin?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    May I ask how you resolved this issue? I am currently receiving the same error, but have no idea why it’s doing that and no idea how to fix it. It doesn’t seem to be any of my other plugins causing the issue.

    Thanks!

    Thread Starter CrazySerb

    (@crazyserb)

    Been digging all over the place, but I think it was something due to WP 5 upgrade that messed up the settings for the ACF fields, so go into those specific fields in ACF plugin and make sure there is no any funky validation set in them – you’ll probably run into that weird validation set in the field settings directly, so just remove it and save the field again.

    I ran into this issue as well. I noticed the issue after upgrading to WP 5.1.1 and ACF Pro 5.7.13, from 4.x and and ACF 5.6.x.

    The field was a text field inside a repeater field, but my error was -20 characters rather than -4.

    Luckily the issue was fixable. I ended up exporting the field group via ACF’s export tool, editing the JSON file, deleting the field group in the CMS, then importing the fixed JSON via ACF’s import tool.

    I’m not sure what actually caused the maxlength value to be -20, but I changed it to “”.

    Here’s an excerpt of the JSON with the issue present; see the maxlength value:

                                {
                                    "key": "field_56bcbf54511cf",
                                    "label": "Name",
                                    "name": "name",
                                    "type": "text",
                                    "instructions": "",
                                    "required": 0,
                                    "conditional_logic": 0,
                                    "wrapper": {
                                        "width": 100,
                                        "class": "",
                                        "id": ""
                                    },
                                    "default_value": "",
                                    "placeholder": "",
                                    "prepend": "",
                                    "append": "",
                                    "maxlength": -20,
                                    "readonly": 0,
                                    "disabled": 0
                                },
    • This reply was modified 5 years, 8 months ago by taruckus.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘“Validation failed – Value must not exceed -4 characters” ?!!’ is closed to new replies.