Textarea validate Script

Textarea is a common input graphical type for a user. which indicates a multi - line text entry field. In this Textarea validate Script is used to validate empty textarea and character should be minimum length for a textarea.

Demo :



Text Box :
  Maximum Character Is 500    

Example :

Just click in validate button the java script alert will say 'Please Type Text for Textarea'  then type text at text area if you like.

Code :

If you need to validate a textarea following code helpful to you.you want to your web site copy and use it.


function validate()
{
  if(document.frm_textarea_box.textarea_box.value=='')
  {
    alert('Please Type Text for Textarea');
    document.frm_textarea_box.textarea_box.focus();
    return false;
  }

  var textarea_value = document.frm_textarea_box.textarea_box.value;
  if(textarea_value.length >= 500)
  {
    alert('Please Type a Character below 500');
    document.frm_textarea_box.textarea_box.focus();
    return false;
  }
}

In the above validate() function have using two validate conditions for a textarea. first one is empty textarea validate and second one is character should be a maximum 500 length validate .

Free Download Script:

If you need to Textarea Validate Script click and download from following zip file.

Download -->




Content