Closed Jimmea closed 5 years ago
sorry for late response I'll be looking into this.
Sorry for delay I'm upgrading the project and will publish it soon with complete docs. I'm afraid to tell confirm will not work for now as it is written for vue js, for the time being you can do a manual compare for password.
Yes, :)) Thank u reply . I have been worked it
2018-02-21 3:56 GMT+07:00 Moeen notifications@github.com:
Sorry for delay I'm upgrading the project and will publish it soon with complete docs. I'm afraid to tell confirm will not work for now as it is written for vue js, for the time being you can do a manual compare for password.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/moeen-basra/ree-validate/issues/2#issuecomment-367116288, or mute the thread https://github.com/notifications/unsubscribe-auth/ALBg85Jb42e4ARvqvKdJLh2-eeNnzr8Bks5tWzFugaJpZM4RMdC7 .
@Jimmea How did you fix it in your project? In my case v3.0.2
it's doesn't work
You have to do this menually at the moment.
Still have this issue , Is there other way to fix ? Thank you
password: 'required', password_confirmation: 'required|confirmed:password',
unfortunately, its not ready yet. you can manually create a function for password fields match.
Any guide on how you were able to do it @moeen-basra I am trying to use custom rule but I can't figure out how to map the two fields together. I am having
ReeValidate.extend('confirmation', (value, [otherValue]) => {
return value === otherValue;
}, {
hasTarget: true,
});
but my concern is that ref
is the approach for vue js which would not work in the react js since react js uses ref for something else internally
I'm also using custom rule for now but working on new release and hope it will resolve all the basic problems.
The actual delay is due to time
Ohhh.... would be so kind as to share a guide approach to how you were able to solve it... or an approach how think it can be solved... I have trying to understudy the whole codebase to see if I can be of help but I am very tied up to finishing the project am working on now and this is the only delay I am having
Or if you can tell how to use the after rule then I think I can be able to solve it that way... I have been trying to implement the after rule as well @moeen-basra
that also am doing manually
Wow....
@moeen-basra Please is there any exposed function which can let me get the value of a field by the name I get from the parameter ref[0]
it think that should be used internally
So after serious digging into the library and the whole architecture, I first would like to commemorate @moeen-basra for a good job well done on the package, I know it is not an easy job to maintain an open source project but its a good job done, I give it 👍 . I saw the new revamp branch you were working and its a really huge one, hopefully, someday when am free I can help out on it, hope it welcomed to contribute.
So I was able to solve this by doing some little hack on the. after initializing my setup I had to check my method that call validate and defer the method call on the input I want to do comparison check.
if (name === 'compare') {
const result = this.validator.rules.confirmed(value, otherValue);
if (!result) {
this.validator.errors.add(name, 'Comparison not matched');
}
} else {
// normal validator for all input
}
but I am not sure that is going to work for validateAll method though... hopefully that can save someone a day
yes ofcourse every single contibution to opensource is valueable. The current version of package was not much modified and so was not very friendly with react except the general rules. But I'm sure the next version will not only work with react out of the box but also with any javascript library.
Any update on the above ? Many thanks
Any update on the above ? Thanks for great package.
password: 'required|min:6', passwordConfirm: 'required|min:6|confirmed:password'