limcheekin / jquery-validation-ui

JQuery Validation UI Plugin - Client Side Validation without writing JavaScript
http://limcheekin.github.io/jquery-validation-ui/
Apache License 2.0
20 stars 18 forks source link

[ Duplicate of #14] Custom validator failure: No such property: request #19

Closed bwolin closed 11 years ago

bwolin commented 11 years ago

[ Sorry. This is a duplicate of #14. I don't think I can withdraw the issue however ]

Domain classes with a custom validation block trigger this exception:

Caused by MissingPropertyException: No such property: request for class: org.grails.jquery.validation.ui.JqueryValidationService ->> 348 | doCall in org.grails.jquery.validation.ui.JqueryValidationService$_createJavaScriptConstraints_closure8


| 271 | createJavaScriptConstraints in org.grails.jquery.validation.ui.JqueryValidationService

static constraints = { ...

    phoneList (validator: { phones, obj, errors ->
        phones.each { p ->
            if (! (p ==~ phoneMask)) {
                errors.rejectValue("phoneList", "personalPhone.phoneNo.matches")
            } 
        }
    })

}

limcheekin commented 11 years ago

Fixed in release 1.4.1. Please see release notes at http://limcheekin.blogspot.com/2013/02/jquery-validation-ui-plugin-141.html