Open martinszeltins opened 3 days ago
I'll look into this today! Thanks for reporting
Fixed in 0.2.6
. My types are becoming a nightmare π
I will focus on finishing my unit tests and type tests
I will focus on finishing my unit tests and type tests
I think this is a REALLY good idea. ππ» For such a complex library it is very important to have 100% test coverage to make sure everything really works as expected and that things don't break with code changes. Have lots of tests!
@victorgarciaesgi I still don't see the external errors in my form π
Screenshot:
Yep I know! I have a lot already but not enough! I was beginning to write the externalErrors
π
Found my mistake, will make another release.
Also what behaviour is the best with externalErrors
(never used it in real cases)
Do the errors have to go once the field is touched? Or do they stay?
Yep I know! I have a lot already but not enough! I was beginning to write the
externalErrors
π Found my mistake, will make another release. Also what behaviour is the best withexternalErrors
(never used it in real cases) Do the errors have to go once the field is touched? Or do they stay?
In Vuelidate the external errors were cleared automatically IF you used $model
to bind it to your form. Otherwise, they stayed until you called $clearExternalResults
or you reset the whole form. I guess rewardEarly also plays a role.
If user does not bind the $model
or the $value
(regle) in the form but binds the original form model then I think it would be very nice to have an option to clear the external errors when a field is touched/changed. It would be nice if this was configurable.
So, 1) You validate the form, 2) backend sends field errors 3) you change that field value and the backend error goes away. (or not, depending on configuration)
https://vuelidate-next.netlify.app/advanced_usage.html#clearing-externalresults
I'm helping myself with Vuelidate specs to know the behaviours that's what I understood from it! Thanks
I will work on this on add a configurable way other than rewardEarly
to clean the errors
Thanks for your help!
Still an issue when clearing external errors, will be fixed on next version
There still seems to be an issue with server errors. There could be a case where I don't have any client-side validation rules but only backend/server validation error messages. If I don't have any client validation rules but only server errors then we have multiple problems. There could also be a case where some fields have client errors but other fields don't have client errors.
referenceNumber?: string[] | undefined;
For me it saysname
field does not exist at all.Reproduction link: https://stackblitz.com/~/github.com/martinszeltins/regle-issue-5
pages/index.vue