rasoul_rezazadeh's avatar

validation form

hi. i want to control the username in my form with this: the username should be "a to z" only (no numbers,no anything else). how can i use java script for that? how can i understand that input contains a to z only?

0 likes
2 replies
ElwinB's avatar

Hi rasoul,

Are you using a modern javascript framework, or something like jQuery in your project?

In jQuery you could use a line like:

$("#inputId").rules("add", { pattern: "^[a-zA-Z]$" });

Please or to participate in this conversation.