function cbi_validate_field(type, optional, field)
{
+ field.className = field.className.replace(/ cbi-input-invalid/g, '');
+
var vldcb = cbi_validators[type];
if( vldcb )
{
if( ((value.length == 0) && optional) || vldcb(value) )
{
// OK
- field.className = field.className.replace(/ cbi-input-invalid/g, '');
cbi_validate_disable_form(field.form, false);
}
else
else
{
// OK
- field.className = field.className.replace(/ cbi-input-invalid/g, '');
cbi_validate_disable_form(field.form, false);
}
}