Title: Front end validation`
Last modified: August 21, 2016

---

# Front end validation`

 *  Resolved [msteel](https://wordpress.org/support/users/msteelnapcocom/)
 * (@msteelnapcocom)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/front-end-validation/)
 * Is there a way to do front end validation, hopefully with jQuery validate. I 
   see there is some JS validation in the plugin, but it does not seem to work for
   me, even on a clean install of WP and Pods.
 * I need to prevent the custom post type from saving if the required fields are
   not valid.
 * Any help would be appreciated, thanks.
 * [https://wordpress.org/plugins/pods/](https://wordpress.org/plugins/pods/)

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/topic/front-end-validation/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/front-end-validation/page/2/?output_format=md)

 *  Plugin Contributor [Josh Pollock](https://wordpress.org/support/users/shelob9/)
 * (@shelob9)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/front-end-validation/#post-4886171)
 * Can you explain what your needs are as far as validation for the form are? Also
   what do you mean by “does not seem to work”? Are you getting an error or do you
   have an expectation that you are unable to fulfill?
 *  Thread Starter [msteel](https://wordpress.org/support/users/msteelnapcocom/)
 * (@msteelnapcocom)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/front-end-validation/#post-4886179)
 * Thanks for the quick reply. What I meant by “does not seem to work” is that when
   I attach requirement to a field, say a simple text field, and submit the form
   I get an error in my console.
 * POST [http://local.blah.com/email-templates/wp-admin/post.php](http://local.blah.com/email-templates/wp-admin/post.php)
   500 (Internal Server Error)
 * That error does not appear if I remove the requirement, so it seems as if something
   is trying to happen, but failing.
 * Doing a little debugging in jquery.pods.js I can see that the script loads by
   adding a console.log statement but another console.log within the validate method
   never fires, so I’m not sure what would be causing the 500 error to begin with(
   and as I mentioned, it is only there when there is a required field)
 *  Thread Starter [msteel](https://wordpress.org/support/users/msteelnapcocom/)
 * (@msteelnapcocom)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/front-end-validation/#post-4886180)
 * I should I add, I realize jquery.pods.js validate might be for creating pods,
   I’m not sure, I’m still ramping up on pods. Loving the plugin, it really is fantastic.
 *  Plugin Contributor [Josh Pollock](https://wordpress.org/support/users/shelob9/)
 * (@shelob9)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/front-end-validation/#post-4886397)
 * Can you share the code that you added please? I will have some one take a look
   and give you some feedback and direction.
 *  Thread Starter [msteel](https://wordpress.org/support/users/msteelnapcocom/)
 * (@msteelnapcocom)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/front-end-validation/#post-4886402)
 * You mean the code to jquery.pods.js?
 *     ```
       That is simply the console.log statements here...
   
       ( function ( $ ) {
       	console.log('one');
           var pods_changed = false,
               pods_form_field_names = [],
               methods = {
                   validate : function () {
       				console.log('two');
                       var $containers = $( 'form.pods-submittable, .pods-validation' ),
                           form_fields = 'input.pods-validate, select.pods-validate, textarea.pods-validate';
       ```
   
 * This is on a fresh install of WP and Pods.
 *  Plugin Contributor [Josh Pollock](https://wordpress.org/support/users/shelob9/)
 * (@shelob9)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/front-end-validation/#post-4886406)
 * No I meant the code you are adding to attempt to add validation. Sorry I was 
   not clear.
 *  Thread Starter [msteel](https://wordpress.org/support/users/msteelnapcocom/)
 * (@msteelnapcocom)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/front-end-validation/#post-4886407)
 * I guess my question is, “Is front end validation via javascript something Pods
   does or is it something I need to develop?”
 *  Thread Starter [msteel](https://wordpress.org/support/users/msteelnapcocom/)
 * (@msteelnapcocom)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/front-end-validation/#post-4886520)
 * I’m just looking for closure on this. If front end validation is something I 
   need to do I’m happy to do so and try and make it something I can contribute 
   somewhere.
 * Thanks,
 * -Marc
 *  Plugin Author [Scott Kingsley Clark](https://wordpress.org/support/users/sc0ttkclark/)
 * (@sc0ttkclark)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/front-end-validation/#post-4886577)
 * Pods handles it’s own validation, but you can use jQuery validation on-top of
   it when using the public forms. Our validation happens server-side, and we send
   back an error during processing.
 * The error 500 isn’t something that’s normal, so you may want to [report that bug on our GitHub](http://pods.io/submit/)
   and we can work through what exactly is causing that.
 *  Thread Starter [msteel](https://wordpress.org/support/users/msteelnapcocom/)
 * (@msteelnapcocom)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/front-end-validation/#post-4886582)
 * OK, thanks. I’ve been working on a plugin to handle the validation. I should 
   have it up on GitHub later today or tomorrow and will let you know in case you
   have any interest in checking it out. It’s working quite well for my needs so
   far.
 *  Plugin Contributor [Josh Pollock](https://wordpress.org/support/users/shelob9/)
 * (@shelob9)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/front-end-validation/#post-4886583)
 * Yes, please share the link here.
 *  Thread Starter [msteel](https://wordpress.org/support/users/msteelnapcocom/)
 * (@msteelnapcocom)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/front-end-validation/#post-4886584)
 * It still has a ways to go but it seems to work well for most field types. Relation
   fields and color pickers might need some special love, but in general I’m happy
   with the start of this. I’m curious what you think.
 * [https://github.com/mpsteel/pods-validation](https://github.com/mpsteel/pods-validation)
 * Thanks!
 *  Plugin Contributor [Josh Pollock](https://wordpress.org/support/users/shelob9/)
 * (@shelob9)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/front-end-validation/#post-4886585)
 * This looks very promising. Thanks for your work on this. I have not had a chance
   to test this out yet, just to look at the code. Two things that jumped out at
   me:
 * This plugin will generate fatal errors if Pods isn’t activated. You should set
   your code to only run if Pods is active. I cover how to do this in my [series on creating Pods plugins](http://pods.io/tutorials/creating-pods-plugins/).
   We have [a full starter plugin for Pods plugins](https://github.com/pods-framework/pods-extend),
   as well as [a simple example of how to safely add code dependent on Pods](https://gist.github.com/Shelob9/9979551#file-simple-pods-plugin-php).
 * You are prefixing your php functions with Pods. It is best practice for an add-
   on plugin to have its own prefix, that way you avoid using a function name that
   Pods uses, or may use in the future.
 * I will take a more detailed look at the plugin tomorrow and provide any additional
   feedback I can.
 *  Thread Starter [msteel](https://wordpress.org/support/users/msteelnapcocom/)
 * (@msteelnapcocom)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/front-end-validation/#post-4886586)
 * Thanks for this, yeah I was anxious to get the core functionality down, I’ll 
   make it more formal. I’ve just updated the picks functionality. I know WYSIWYG
   is not firing properly. I’m sure there’ll be more. Always more… 🙂
 *  Thread Starter [msteel](https://wordpress.org/support/users/msteelnapcocom/)
 * (@msteelnapcocom)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/front-end-validation/#post-4886588)
 * The plugin has been updated to follow your Pods plugin framework.
 * [https://github.com/mpsteel/pods-validation](https://github.com/mpsteel/pods-validation)

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/topic/front-end-validation/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/front-end-validation/page/2/?output_format=md)

The topic ‘Front end validation`’ is closed to new replies.

 * ![](https://ps.w.org/pods/assets/icon.svg?rev=3286397)
 * [Pods - Custom Content Types and Fields](https://wordpress.org/plugins/pods/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pods/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pods/)
 * [Active Topics](https://wordpress.org/support/plugin/pods/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pods/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pods/reviews/)

 * 22 replies
 * 4 participants
 * Last reply from: [hasanhalabi](https://wordpress.org/support/users/hasanhalabi/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/front-end-validation/page/2/#post-4886661)
 * Status: resolved