jaredatch/Custom-Metaboxes-and-Fields-for-WordPress — Issue #58: Validation
Author: stompweb
Created: 2011-12-15 20:00:51+00:00
State: open

I know this would require a fair bit of work (maybe not so much to someone who knows what they are doing) but implementing some jquery validation and having it as an option in the settings.

array(
'name' => 'Test Text',
'desc' => 'field description (optional)',
'id' => $prefix . 'test_text',
'type' => 'text',
'required' => 'true',
'validation' => 'email'
),

Therefore, the field is required and it must be an email address.

If it isn't then it puts the 'publish' or 'update' button in the 'greyed out' state so a user can't submit.

I understand that this is a big bit of work, but I feel something like this would be a great addition.

Here is some further reading: http://www.1stwebdesigner.com/tutorials/building-real-time-form-validation-using-jquery/