Skip Navigation

[Resolved] Toolset Types – Custom Field – Required Validation Not Working

This support ticket is created 4 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Shane 4 years, 5 months ago.

Assisted by: Shane.

Author
Posts
#2187643
Screenshot from 2021-10-05 10-57-27.png

I am trying to: Ensure a custom field associated with a custom post type is required.

Steps to reproduce

I installed a fresh copy of WordPress (5.8.1) and Toolset Types (3.4.14)
I created a new post type
I created a new custom field associated with that post type (a multiline field) and set that it is required
I then went to add a new item for that post type. Without populating any of the fields, I hit publish
I was expecting to see validation errors as the required field is not populated and the post to Not be saved
Instead the post was saved and published AND the validation errors showed

Create a custom field in a custom post type and set that field to required.

#2187937

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Daniel,

Thank you for getting in touch.

I was able to replicate this issue you are having and escalated it to our 2nd tier support team for further checks.

However the issue only occurs when the editor for the post has been disabled. For now you can workaround the issue by enabling the default editor for the post and the validations should prevent the user from submitting the posts without the field being filled in.

Thanks,
Shane

#2188743

Hi Shane,

Yes, I was able to verify the validation works when the Block Editor is enabled with Title and Editor fields selected.

Will use that as the workaround until resolved.

Thanks

Daniel

#2188879

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Daniel,

Great. I can confirm that this issue has been escalated to our development team so there isn't much else that we can do here until this is patched by our development team.

You can follow the link below for updates on when this gets resolved.
https://toolset.com/errata/types-field-validation-fails-if-post-editor-doesnt-include-post-content-section/

Thanks,
Shane