Comments (18)
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
from ree-validate.
Still have this issue , Is there other way to fix ?
Thank you
password: 'required',
password_confirmation: 'required|confirmed:password',
from ree-validate.
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
from ree-validate.
sorry for late response I'll be looking into this.
from ree-validate.
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.
from ree-validate.
from ree-validate.
@Jimmea How did you fix it in your project? In my case v3.0.2
it's doesn't work
from ree-validate.
You have to do this menually at the moment.
from ree-validate.
unfortunately, its not ready yet. you can manually create a function for password fields match.
from ree-validate.
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
from ree-validate.
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
from ree-validate.
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
from ree-validate.
that also am doing manually
from ree-validate.
Wow....
from ree-validate.
@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
from ree-validate.
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.
from ree-validate.
Any update on the above ?
Many thanks
from ree-validate.
Any update on the above ?
Thanks for great package.
from ree-validate.
Related Issues (17)
- Add features like prestine, dirty, valid HOT 5
- How to pass options parameters? HOT 5
- missing "same" rule HOT 1
- Custom Validation Rule and Passing Constructor Options
- validateAll triggers all error messages in form HOT 3
- Validating Dynamically added elements HOT 1
- Cant set alias for names HOT 1
- How to validate object values HOT 1
- Different behaviour in chrome and firefox
- Regex Problem HOT 1
- ReeValidate.Validator is not a constructor HOT 1
- Required_if does not exist ?
- Version 3.3.0 update not working HOT 1
- multiple field attach HOT 4
- How can we add message to one rule with more validation HOT 1
- how can we add custom validation message for particular rule
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ree-validate.