Published
- 1 min read
jquery validate if field exists
The solution for this is noted below
jquery validate if field exists
Solution
if ($('#selector').length) {
// use this if you are using id to check
// it exists
}
if ($('.selector').length) {
// use this if you are using class to check
// it exists
}
Try other methods by searching on the site. That is if this doesn’t work