- no HTML rules using latest bootstrap.
- Tested on jQ 2.14 and 1.11.3 min and not minimized,
-
Validate 1.13.0, form is fully loaded when this executes.
-
.valid() says true even if required fields are missing
-
Error appears when I type on field, or exit a field, not when initiating validate
- instantiated with: myvalidator=$('#areas_Create_modal').validate({
- rules: { area_name_EN: {required: true},area_name_ES: {required: true}}
- });
- myvalidator on console shows:
myvalidator.settings
< Object
debug: true
errorClass: "error"
errorContainer: Object[0]
errorElement: "label"
errorLabelContainer: Object[0]
focusCleanup: false
focusInvalid: true
groups: Object
__proto__: Object
highlight: function (element, errorClass, validClass) {
ignore: ":hidden"
ignoreTitle: false
messages: Object
onclick: function (element) {
onfocusin: function (element) {
onfocusout: function (element) {
onkeyup: function (element, event) {
onsubmit: true
rules: Object
area_name_EN: Object
area_name_ES: Object
required: true
__proto__: Object
__proto__: Object
unhighlight: function (element, errorClass, validClass) {
validClass: "valid"
__proto__: Object
[Error] TypeError: undefined is not an object (evaluating 'validator.settings')
delegate (jquery.validate.js, line 364)
(anonymous function) (jquery.validate.js, line 1359)
dispatch (jQuery-2.1.4.min.js, line 3)
handle (jQuery-2.1.4.min.js, line 3)
trigger (jQuery-2.1.4.min.js, line 3)
simulate (jQuery-2.1.4.min.js, line 3)
c (jQuery-2.1.4.min.js, line 3)
what can be wrong?