ghiscoding / Aurelia-Bootstrap-Plugins

Aurelia-Bootstrap-Plugins are Custom Elements to bridge with a set of 3rd party Bootstrap addons
https://ghiscoding.github.io/Aurelia-Bootstrap-Plugins
MIT License
45 stars 23 forks source link

aurelia-validation not working #10

Closed tobiaszuercher closed 7 years ago

tobiaszuercher commented 7 years ago

Hi, i'm having some issues with validation.

<abp-datetime-picker value.bind="something.foo & validate" options.bind="{ format: 'DD.MM.YYYY' }"></abp-datetime-picker>

the validation works while tabbing out of the field. but if I call validationController.validate(), it doesn't see any value on the field thus fails the validation.

Any recommendation how to use your component with aurealia-validation?

ghiscoding commented 7 years ago

Hi thanks for the feedback, I have to say that I haven't tried to use aurelia-validation yet. If you can spot the issue and/or help in fixing this, I am open to suggestions/PR

It would also be nice to update both of my samples to use aurelia-validation, if you could make a PR that would be great. Thanks

tobiaszuercher commented 7 years ago

hi, thank you for your answer. i'm just new to aurelia so i don't know all the details about it. think has to with the binding..

the value is there but for some reason, the binding doesn't get it. because if i type it in it works, just the picker doesn't work.

not sure how the bootstrap-picker works internally and where the value is stored? how is the value set in the textfield with the mouse?). i think somehow the shadow field is not catched by the validaiton. probably something small if you know bootstrap-picker & aurelia-validation. i don't ;)

for short term: i have to skip the validation on the datepicker. as soon as i get some more time i will look into it.

tobi

ghiscoding commented 7 years ago

Hi there, I followed the instruction from this article Aurelia validation alpha and made couple of modifications to all of my plugins which was described in the article. I also added a validation form sample to my client-wp (WebPack) sample, it seems to all work now. So I will close the issue, if you got more problem, feel free to open another issue.

Thanks for the feedback and click on :star: if you haven't already :)

tobiaszuercher commented 7 years ago

awesome, thank you very much! i have time now to try it out!

tobiaszuercher commented 7 years ago

works like a charm! thank you!

ghiscoding commented 7 years ago

Great, click on the ⭐️ if you like :P