Open iuribrindeiro opened 5 years ago
It's gonna be very easy to make a validation in a model with this implementation! @EisenbergEffect
@iuribrindeiro that'd be awesome.
Here are some issues where you can get some more ideas to implement it (not listed in any order)
Awesome,@bigopon! I'll open a PR soon for that :)
Hey, @bigopon, can you help me create a PR? I should create a branch and then create a PR to develop?
@iuribrindeiro, nice idea! Just some proposals:
Don't forget about the localization! I have two variants on how to interface it: 1.1. Use an options container as a decorator's parameter, e.g. @email ({messageKey: "the_email_has_wrong_format", fallbackMessage: "The email...", ....}) 1.2. or... to make an additional attribute, something like as @messageKey("the_email_has_wrong_format")
To add as a parameter/attribute the trigger param about when to validate: on blur, on every change, or something else. And that must be per binding.
Well, I'm currently working on decorators for aurelia validation. At the moment, I have the following code working:
After I'm done, would you guys be interested in accept a PR?