Home
Do you always use the html maxlength attribute on input fields to limit number of characters to the length of the field in the table?
  v1.0 Posted at 25/08/2016 8:04 AM by Tiago Araujo

Rule 1: Whenever you have a data entry page you should always use the html maxlength attribute to limit number of characters to the length of the field in the table (except for numbers).

Rule 2: Whenever you have a situation where you are using the HTML textarea (does not have the maxlength property) ​

Then you need to:​

  • add the JavaScript function eg. ValidateLength(control)
  • add 2 properties to every data control  eg. dataType="char" onkeyup="validateLength(this)"

Related rules

    Do you feel this rule needs an update?

    If you want to be notified when this rule is updated, please enter your email address:

    Comments:

    Note: Social Media login for Yotpo is not working in IE or Safari, please use Chrome. We are waiting for Yotpo to fix it.