0
votes
1answer
32 views

How to validation for sanitize_URL?

Like sanitize_email validation is options available but sanitize_url options is available .if options is not available then how can i do this . http://i.imgur.com/WPYdkTb.png
0
votes
2answers
149 views

Validating custom meta boxes with jQuery results in posts being saved as draft instead of published post

I have a custom post type with a bunch of custom fields. I want to validate the meta box input with jQuery as soon as you press the Publish button. Here's what I have (I left out all my validation ...
0
votes
1answer
184 views

How to reload the role specific registration form on validation errors?

I test a solution for separate registration for different roles and it works very well. But the validation part/function (see bellow) on errors reloads/reuse the generic registration link and not the ...
4
votes
2answers
3k views

How to validate custom fields in custom post type?

I wrote a plugin that creates a custom post type with custom fields. To prevent users from entering incorrect information, how can I validate the data? I assumed that the save_post hook function ...
1
vote
2answers
343 views

Validate data on attachment_fields_to_save

I'm very glad that there is such a dedicated website for WP. My problem is data validation upon saving attachment fields. I have added many custom fields to attachment/media library dialog, most of ...
0
votes
1answer
932 views

How to make custom comment fields required and message field not required

I have a comment form that has name, email, brief, detailed and rating fields. The name, email, brief and rating need to be required, but the latter two are custom fields and I can only make them ...
5
votes
3answers
5k views

don't publish custom post type post if a meta data field isn't valid

I have a custom post type (CPT) called event. I have a meta box for the type with several fields. I would like to validate some fields before publishing an event. For example, if an event's date is ...
2
votes
2answers
1k views

Correct Approach for Validating Custom Field Input

I have a custom post type with several custom fields. I am looking to do some validation on these fields because they will be used downstream by other services. So, it is important that it can't be ...