magento frontend validation class and use of class

magento frontend validation class and use of class

In this post we will show you how to use magento frontend validation class . hear we will give you list of class and its use in magento frontend class for validation.

we can find all class at validation.js for file are outlined in directory of magento root directory that at : /js/prototype/validation.js file.

Example for magento frontend validation class ::

<input id=”email_address” name=”email” type=”text” class=”validate-email” />

So please follow below class that are used magento for validation.

Class Name :: Description
validate-no-html-tags :: HTML tags don’t seem to be allowed
validate-code :: Please use solely letters (a-z), numbers (0-9) or underscore(_) during this field, initial character ought to be a letter
validate-alphanum :: Please use solely letters (a-z or A-Z) or numbers (0-9) solely during this field. No areas or alternative characters are allowed
validate-select :: Please select AN option
validate-alphanum-with-spaces :: Please use solely letters (a-z or A-Z), numbers (0-9) or areas solely during this field
required-entry :: This could be a needed field
validate-street :: Please use solely letters (a-z or A-Z) or numbers (0-9) or areas and # solely during this field
validate-phoneLax :: Please enter a legitimate signaling. for instance (123) 456-7890 or 123-456-7890
validate-date :: Please enter a legitimate date
validate-email :: Please enter a legitimate email address. for instance info@onlinecode
validate-emailSender :: Please use solely visible characters and spaces
validate-admin-password :: Please enter seven or a lot of characters. watchword ought to contain each numeric and alphabetic characters
validate-number :: Please enter a legitimate variety during this field
validate-number-range :: The worth isn’t among the desired range
validate-digits :: Please use numbers solely during this field. Please avoid areas or alternative characters like dots or commas
validate-digits-range :: The worth isn’t among the desired range
validate-alpha :: Please use letters solely (a-z or A-Z) during this field
validate-one-required :: Please select one of the above options
validate-url :: Please enter a legitimate URL. Protocol is needed (ftp://, https:// or http://)
validate-identifier :: Please enter a valid URL Key. For example “example-pagename”, “example-pagename”.html” or “anotherlevel/example-pagename”
validate-zip :: Please enter a valid zip code. For example 905262 or 905262-4321
validate-ssn :: Please enter a valid social security number. For example 987-65-4321
validate-currency-dollar :: Please enter a valid $ amount. For example $116.00
validate-zero-or-greater :: Please enter a number 0 or greater in this field
validate-phoneStrict :: Please enter a legitimate signaling. for instance (123) 456-7890 or 123-456-7890
validate-phoneLax :: Please enter a legitimate signaling. for instance (123) 456-7890 or 123-456-7890
validate-date-au :: Please use this date format: dd/mm/yyyy. For example 28/03/2017 for the 28th of March, 2017
validate-fax :: Please enter a legitimate fax variety. for instance (123) 456-7890 or 123-456-7890
validate-zip-international :: Please enter a valid zip code
validate-not-negative-number :: Please enter a number 0 or greater in this field
validate-state :: Please choose State/Province
validate-password :: Please enter half-dozen or a lot of characters. Leading or trailing areas are going to be ignored
validate-greater-than-zero :: Please enter variety larger than zero during this field
validate-cpassword :: Please certify your passwords match
validate-new-password :: Please enter half-dozen or a lot of characters. Leading or trailing areas are going to be ignored
validate-clean-url :: Please enter a legitimate URL. For example http://www.onlinecode or www.onlinecode
validate-cc-number :: Please enter a legitimate mastercard number
validate-cc-exp :: Incorrect mastercard expiration date
validate-xml-identifier :: Please enter a valid XML-identifier. For example somethingname_116, block8, id-17
validate-cc-type :: Credit card variety doesn’t match mastercard type
validate-one-required-by-name :: Please select one of the options
validate-cc-cvn :: Please enter a legitimate mastercard verification number
validate-percents :: Please enter variety below 100
validate-cc-ukss :: Please enter issue variety or begin date for switch/solo card type
required-file :: Please choose a file
validate-length :: Text length doesn’t satisfy specific text range
validate-data :: Please use solely letters (a-z or A-Z), numbers (0-9) or underscore(_) during this field, initial character ought to be a letter
validate-cc-type-select :: Card sort doesn’t match mastercard number
validate-css-length :: Please input a legitimate CSS-length. for instance 110px or 76pt or 22em or .6ex or 51%

You also like Get Order Details using Order and customer registration programmatically and Magento2 admin login user detail

Leave a Comment

Your email address will not be published. Required fields are marked *

  +  79  =  82

We accept paid advance and paid guest Posting on our Site : Contact US