I am trying to validate a form which allows user input and I'm using the jQuery plugin found below.
http://docs.jquery.com/Plugins/Validation/Methods
The details are being held within a back-end database and validating the date/email/text entries has worked fine and isn't causing any problems.
However, every time I try and specify a number/digits format the back-end php file complains about the data being truncated for 'Age' (One of the database fields) and doesn't execute.
Age is set as an integer in the database, with a max length of 3.. What's causing this to break everytime?
My Code -
jQuery(document).ready(function(){
jQuery("#custform").validate({
rules: {
DateOfOrder: {
required: true,
dateISO: true
}
Age: {
required: true,
digits: true
}
}
});
});
My Form Element -
<p>
<label for="cname">Age</label>
<input id="Age" name="Age" size="15" class="required" maxlength="3" /><em>*</em>
</p>