jwaliszko / ExpressiveAnnotations

Annotation-based conditional validation library.
MIT License
351 stars 123 forks source link

Readonly field + RequiredIf attribute = not required even though it should be #42

Closed kaseykrehbiel closed 9 years ago

kaseykrehbiel commented 9 years ago

I am attaching a datepicker to an element and setting the element to readonly="readonly". The RequiredIf attribute works properly if I remove the readonly attribute but will not work with the readonly attribute present.

disabled="disabled" should not validate, but readonly="readonly" should.

jwaliszko commented 9 years ago

Hi, thanks for reporting this issue. I'll take a look at it.

kaseykrehbiel commented 9 years ago

I just found the culprit. It is not the fault of ExpressiveAnnotations.

https://github.com/jzaefferer/jquery-validation/commit/9f4ba10ea79b4cf59225468d6ec29911f0e53a0a

It was an update to jQuery validation (a bad and erroneous update, if I do say so myself.)

Thank you for the quick response.

jwaliszko commented 9 years ago

Thanks for information. Regards