I'm trying to get a form validated with the jQuery validation engine plugin and it is not working on latest firefox or IE.
This is my on the form page:
<script src="js/jquery-1.9.1.min.js" type ="text/javascript"></script>
<script src="js/jquery-ui-1.10.2.custom.js" type ="text/javascript"></script>
<script src="js/jquery.validationEngine.js"></script>
<script type="text/javascript">
jQuery(document).ready( function() {
// binds form submission and fields to the validation engine
jQuery("#formID").validationEngine();
});
function checkHELLO(field, rules, i, options){
if (field.val() != "HELLO") {
// this allows to use i18 for the error msgs
return options.allrules.validate2fields.alertText;
}
}
</script>
And here are some of the form fields for reference:
<form action ="enviar.jsp" method="post" name="seguimiento" id="seguimiento">
<label>GolTV:</label>
<input name="Gol" type="number" id="Gol" title="Gol" min="0" class="validate[custom[number],min(0)]">
<br>
<label>Bajas:</label>
<input name="Bajas" type="number" id="Bajas" title="Bajas" min="0" class="validate[custom[number],min(0)]">
<br>
<label>Preinst teléfono:</label>
<input name="Preinstalaciones" type="number" id="Preinstalaciones" title="Preinstalaciones" min="0" class="validate[custom[number],min(0)]">
<input type="submit" value="Enviar">
This works just fine on Chrome, if someone inputs a negative number or a letter in the fields a message pops and says that's wrong, however nothing is happening on firefox.
JavaScript console just complains about this:
Fecha y hora: 27/03/2013 16:45:11
Advertencia: Error al interpretar el valor para 'filter'. Declaración rechazada.
Archivo de origen: http://<myhost>/Tecnicos/css/jquery-ui-1.10.2.custom.css
Which translates into Error interpreting the value for 'filter'. Declaration rejected.
There are a few of these, but all related to the css, nothing with javascript at all.
Any ideas?
The problem was the localization rules weren't added.
After adding
<script src="js/jquery.validationEngine-es.js"></script>
It works.