javascript - How to check for a certain text value with jQuery.validate() -


I use the jQuery.validate () plugin to validate the forms of my website I am here. What am I going to do now, when a text field contains a certain string, an error is thrown. For example, suppose that the string matching is "Penguin". If the user enters the "I like penguins", then there should be an error, although the user can enter the penguin in a word without that word, it should be accepted.

Is this a valid way to validate? I can not understand it ...

Thank you!

check

  jQuery.validator.addMethod ("title penguin" , Function (value, element) {value = $ .trim (value.toLowerCase)  

()); If (this.optional (element)) / ^ ((?? Penguin).) *************************************************************************************** **********************************);)

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -