jQuery Validation required (dependency-callback) not working
Hey,
I've double-checked this code a dozen times and I don't see anything syntactically wrong. My dependency callback is a simple return false to eliminate any errors in the function itself. The basic idea is that my input text fields have a default value such as "Name:" in the value attribute of the input tag, so I want to have the validation recognize the value "Name:" as null and throw an error and require them to enter something else.
- $("#frmContact").validate( {
- rules: {
- NAME: {
- required: function(element) {
- return false;
- }
- }
- }
- });