Title: Replacing Validation JS with jquery.validate.js
Last modified: August 21, 2016

---

# Replacing Validation JS with jquery.validate.js

 *  [thatdiegokid](https://wordpress.org/support/users/thatdiegokid/)
 * (@thatdiegokid)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/replacing-validation-js-with-jqueryvalidatejs/)
 * I’m trying to replace the validation that is built into the plugin with jquery.
   validate.js since the alert for the validation is pretty ugly in terms of user
   experience and doesn’t work well with the design the client approved.
 * Help?
 * [http://wordpress.org/plugins/wordpress-form-manager/](http://wordpress.org/plugins/wordpress-form-manager/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [thatdiegokid](https://wordpress.org/support/users/thatdiegokid/)
 * (@thatdiegokid)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/replacing-validation-js-with-jqueryvalidatejs/#post-4297934)
 * wiped userscripts.js
    and modified formelements/formelements.php to this
 *     ```
       function fe_getInputHTML($elementDef){
       	global $wpdb;
       	$query_results = $wpdb->get_results('SELECT required FROM wp_fm_items WHERE <code>unique_name</code> = "'.$elementDef['attributes']['name'].'"');
   
       	$required = "";
       	if ($query_results[0]->required == '1'){
       		$required = " required";
       	}
   
       	$str = "<input type=\"".$elementDef['type']."\" ".fe_getAttributeString($elementDef['attributes']).$required.">";
   
       	return $str;
       }
       ```
   
 *  [GenealogyCoach](https://wordpress.org/support/users/samatva/)
 * (@samatva)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/replacing-validation-js-with-jqueryvalidatejs/#post-4298002)
 * _Good idea, thanks for sharing._ It appears to require an updated browser that
   understands HTML5, but that would basically be the same as a browser that runs
   jQuery. Your method is better for modern browsers in that it does not depend 
   on JavaScript.
    Perhaps this could be built in to the plug in as an option HTML5/
   JavaScript validation?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Replacing Validation JS with jquery.validate.js’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-form-manager.svg)
 * [Form Manager](https://wordpress.org/plugins/wordpress-form-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-form-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-form-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-form-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-form-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-form-manager/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [GenealogyCoach](https://wordpress.org/support/users/samatva/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/replacing-validation-js-with-jqueryvalidatejs/#post-4298002)
 * Status: not resolved