Skip to content
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

Nested data, rules, and messages with wild cards (wild card data get, data set, data fill) #1

Closed
9 tasks
zhorton34 opened this issue May 2, 2020 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@zhorton34
Copy link
Owner

zhorton34 commented May 2, 2020

Outdated initial issue comment (See below comments for updated details)

./src/helpers/dataSet.js

dataSet Method


/**
 * Setting Data On Nested Properties Simplified 
 * 
 * { 
 *.   family: { 
 *.       mom: { first_name: '', last_name: '' },
 *        dad: { first_name: '', last_name: '' },
 *.       sister: { first_name: '', last_name: '' },
 *        brother: { first_name: '', last_name: '' }
 *     }
 *   }
 * 
 *.  setData(family, "family.*.last_name", "smith", overwrite = true);
 */
dataSet(target, value, key = '', overwrite = true)

  • Create Tests For dataSet
  • Setup dot delimited nested property access (see dataGet method)
  • Setup "*" wildcard capability (see dataGet method)
  • Setup multiple nested/wildcard key value pair functionality
  • Pass "overwrite" boolean as optional parameter, "set"(overwrite) as true by default

("set" will override existing values, "fill" will only set "empty" or "missing" values)

  • Update "form.set()" tests
  • Refactor "form.set()" to allow for nested wildcard set capability
  • Update "form.fill()" tests
  • Refactor "form.fill()" to allow for nested wildcard set capability (set overwrite to false)
@zhorton34 zhorton34 added enhancement New feature or request help wanted Extra attention is needed labels May 8, 2020
@zhorton34 zhorton34 self-assigned this May 25, 2020
@zhorton34 zhorton34 changed the title Wild Card Data Set Function Nested data, rules, and messages with wild cards (wild card data get, data set, data fill) Aug 18, 2020
@zhorton34
Copy link
Owner Author

zhorton34 commented Aug 18, 2020

Notes:

@see #17

Expand that question to include wild card data_get, data_set, and data_fill logic for


Repository: https://github.com/zhorton34/vuejs-form

  • Form Data

Repository: https://github.com/zhorton34/vuejs-validators

  • Form Rules
  • Form Messages

@zhorton34 zhorton34 removed their assignment Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant