Jump to content

Help with jQuery.


mnaidis

Recommended Posts

Hello, I got this code in the .js file:

                "username": {
                    // HTML5 compatible email regex ( http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#    e-mail-state-%28type=email%29 )
                    "regex": /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/,
                    "alertText": "* Invalid email address"
                },

 

And I want to do that if the input is not in this form: "Hello_There", "Firstname_Lastname" (with the underscore in the middle) so it'll do

"alertText": "* Incorrect username.

"

 

I don't know how to do that, can someone help me please? :)

Link to comment
https://forums.phpfreaks.com/topic/263114-help-with-jquery/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.