I think the required switch shouldn’t be overridden by anything.
I mean that’s the whole point 1 switch to decide if the field is required or not.
The way you have it now it’s a worthless, I can’t choose to have a gallery as “not required” and a minimum of pictures for those who decide to use it.
i have to set it as “Not required” and also set the minimum to 0. Else it will not validate. See the issue? I just lost control of the minimum images number.
And useful button should behave like this:
-> Is the field required?
-YES: Are images in min-max range? (+other checks)
-No: Don’t validate.
That overriding is wrong. If you want to make it required, flip the switch to ON. Don’t deny control to the rest of the users.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2023 Advanced Custom Fields.