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

fields validation mixin #2

Merged
merged 10 commits into from
Apr 9, 2018
Merged

fields validation mixin #2

merged 10 commits into from
Apr 9, 2018

Conversation

mimecorg
Copy link
Owner

@mimecorg mimecorg commented Apr 4, 2018

Implements a Vue mixin which creates data properties for field values and validation errors based on a list of fields in a component. The mixin also provides the following functions:

  • this.$fields.validate() - validates all fields and returns true if there are no errors
  • this.$fields.modified() - returns true if any field has a different value than the initial value
  • this.$field( name ) - returns the required, maxlength and error properties for the given field

@mimecorg mimecorg added the refactoring Code refactoring label Apr 4, 2018
@mimecorg mimecorg merged commit 2a4996f into master Apr 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Code refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant