Title: How to enable JavaScript validation for custom plugin
Last modified: August 21, 2016

---

# How to enable JavaScript validation for custom plugin

 *  [jstuardo](https://wordpress.org/support/users/jstuardo/)
 * (@jstuardo)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/how-to-enable-javascript-validation-for-custom-plugin/)
 * Hello…
 * I created a new plugin that shows some forms that I need to validate. I have 
   realized about the existing forms, for example, to create new users or pages.
   If I click submit on those forms, without filling required fields, the fields
   are highlighted in red, showing that I need to fill them.
 * I need to achieve the same for my custom plugin. Of course I can download and
   install a jquery validation plugin, but if WordPress already comes with this 
   functionality, why not to use that instead?
 * I have added class=”validate” to my form, form-required class to each tr tag 
   and aria-required=”true” to required fields, as user-new.php file does, but without
   success.
 * Thanks in advance,
    Jaime

The topic ‘How to enable JavaScript validation for custom plugin’ is closed to new
replies.

## Tags

 * [validation](https://wordpress.org/support/topic-tag/validation/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [jstuardo](https://wordpress.org/support/users/jstuardo/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/how-to-enable-javascript-validation-for-custom-plugin/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
