Welcome Guest, Not a member yet? Register   Sign In
want to create form object for validation

want to create form object in javascript for validation in view.php

var frmvalidator =new Validator("selltruck");
frmvalidator.addValidation("countries","dontselect=0","Please Select");
frmvalidator.addValidation("cities","dontselect=0","Please Select");
frmvalidator.addValidation("bodies","dontselect=0","Please Select");
frmvalidator.addValidation("vehicle","req","Enter Vehicle Number");
frmvalidator.addValidation("vehicle","alnum_s","Only AlphaNumeric");
frmvalidator.addValidation("vehicle","maxlen=13","Max length for Vehicle Number is 13");
frmvalidator.addValidation("regpl","req","Enter Registration Place");

this script is not working in codeigniter.

Check out JQuery validation and just add the code to the view


Theme © iAndrew 2016 - Forum software by © MyBB