javascript - jquery validation according database field size -


for example in database column1 having data type varchar , size 200,how check size(200) validation in java script.

you need read simple java script validation tutorial http://www.w3resource.com/javascript/form/javascript-sample-registration-form-validation.php , http://www.tutorialspoint.com/javascript/javascript_form_validations.htm

var col1 = $(document).getelementbyid('#yourinputfieldid').value; if(col1.length > 200) {    alert("invalid value"); } 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -