Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 4556

Denotes questions related to validation like form validation, jQuery validation, prototype validation, server-side validation.

11 votes

How to write mobile number length validation in magento by prototype

By Default Magento give number of validation classes.you just need to use the class name.Its easy find the html tag where their is mobile number html and add a class attribute to that input type and under … <input type="text" id="mobile" name="mobile" title="Mobile" class="input-text required-entry validate-length maximum-length-10 minimum-length-10 validate-digits"> For more reference of classes More Validation
Pradeep Sanku's user avatar
4 votes

Do not allow comma or point on input text

Add a class called "validate-digits" to your input type text line in the form.bascially it will look like <input type="text" class="(your_other_classes) validate-digits" /> for more validation classes … you can refer Form Validation in Magento Note : 'validate-digits' => 'Please use numbers only in this field. …
Pradeep Sanku's user avatar