-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: dot notation for rules? #17
Comments
@shopapps Not as of yet. We have an issue for it here -- #1. Right now I'm over loaded at work and with the youtube channel, but plan on getting back to this issue hopefully sooner than later. That being said, if you're in a hurry and need this solved ASAP I've already created the tested logic for dot notation in this repository (https://github.com/zhorton34/laravel-js-helpers) and just haven't had the time to implement the logic over to this repository for nested rules. If you're interested, I'm more than willing to set up an outlined issue for implementing this feature using the data_get, data_set, and data_fill tested functions from thelaravel js helpers repository. It'd be awesome to get some help copying some of that logic over into this repo and implementing this feature you're talking about. I really want it but just haven't had the time. Here's a quick over view of each method that you'd be interested in from that repo that would be important for implementing dot notation rules. After you see the overview of functions already created below that'll help with dot notation for rules, let me know if you'd be interested and I'll set up the outline and make sure to be more active on this repo for any questions you come across. No worries either way, if not -- I'll eventually be getting around to this feature, my schedule's just hectic right now so it may be a couple months before I personally have the time. data_get: Get's nested data Examples Data Get Data Get Simple data_get(family, 'family.members.brother.name'); Data Get Output
Data Get Wildcard("*") data_get(family, 'family.members.*.age'); Data Get Wildcard Output
Data Set Data Set Simple data_set(family, 'members.brother.age', 21);
data_set(family, 'members.brother.name', 'Everett'); Data Set Wildcard("*") data_set(family, 'members.*.last_name', 'Smith'); Data Set Output
Data Fill Data Fill Simple data_fill(family, 'members.brother.age', 23); // wont do anything
data_fill(family, 'members.brother.name', 'Zak'); // wont do anything
data_fill(family, 'members.brother.birthday', 'April 22'); // will do something Data Fill Wildcard("*") data_fill(family, 'members.*.last_name', 'Horton'); // wont do anything
data_fill(family, 'members.*.nickname', 'Hortonion'); // will do something Data Fill Output
|
Is there any solution/workaround for this issue without changing the vuejs-form rep code? |
@luis-gmonkey Not at the moment, no |
Hi,
Does the validation rules support objects for the fields and dot notation for the rules?
Example:
error when trying to use the object method of rules is:
Error in callback for watcher "form.data": "TypeError: rules.split is not a function"
The text was updated successfully, but these errors were encountered: