angular-auto-validate
angular-auto-validate copied to clipboard
Attribute "element-modifier" is not applied to element descendants
Attribute "element-modifier" is not applied to element descendants for complex elements like timepicker (html table with inputs and button is generated here). The default modifier process these inputs and button.
Have you added "register-custom-form-control" to your custom field? HTML elements are added to a HTML form controller, but custom elements are not. Angular auto validate uses the HTML form controller to decide what it should validate. Adding "register-custom-form-control" makes angular auto validate aware of your custom element.
Let me know if that works for you. :)
Thank you, but it will not work for me (( The module validates timepicker(shows errors or success), that's why no need to use the "register-custom-form-control". In my case the problem is, that default bs3 element modifier adds "has-success has-feedback" style classes, which corrupts view (I still want to use default "has-success has-feedback" for other html elements like input, select etc). That's why I decided to create custom element modifier, where I removed only "has-success has-feedback" style classes in makeValid.
Ok, so to clarify; The default element modifier corrupts the view. To get around that you have created a custom element modifier. You wish to apply this to only your timepicker with element-modifier, but that does not work (as in it does not register as the time modifier for that element)?
Personally never used it with a timepicker. I'll try to take a peek at it later tonight or tomorrow/tomorrow night.
It must be something to do with the root element of the custom control @mgsstms could you do a reproducing plunker so I can debug it.
I got the problem to reproduce this on plunker (shame on mr ((). I prepared the archive with 3 index files: https://www.dropbox.com/s/yvduzitcmem2mk5/_test.zip?dl=0
Thanks for this!!! I'm on holiday until next Wednesday so I afraid I won't be able to look at it properly until then as I only have my tablet with me. Sorry for the inconvenience!
Jon, thank you
@mgsstms were you able to solve it?
I updated template for timepicker template ('form-group' class has been removed for 'meridian' button)