question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Suggestion] Other validators / contrib?

See original GitHub issue

Had a couple of suggestions for common validators in an corporate setting:

  • IP fields (v4 / v6)
  • MAC address

I’d imagine these are common enough in usage that a common implementation would be helpful; however, I can understand not wanting to bloat the core library. If it’s unacceptable to have these in the core library, would you consider a wiki or other piece of documentation that links to external open source validators? For example, if I could push something like vuelidate-ip-validator to GitHub, it would seen sensible to have that referred to here to prevent others writing their own implementations.

Thanks

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Frizicommented, Sep 8, 2017

Sure, though you are free to use any exiting library that provide validation functions, treating the vuelidate only as a validation engine. The only additional thing that could be added specifically for vuelidate is withParams usage, so you can get the feedback from validator function about it’s configuration. This is optional though, useful only when you plan to use $params property.

Validators are already separate from the core anyway. The only problem is that “web” bundle contains them all in single file, validators.min.js, so you can’t opt-out from using them. Having them in separate files would help and we can continue to add even less frequently used validators to this repo. I’m not sure if splitting the packages is necessary and any beneficial. It’s not as general purpose as lodash for example.

BTW, I’m actually using exactly IP fields and mac addresses in my project with Vuelidate 😄

0reactions
robcresswellcommented, Oct 6, 2017

Oh, fantastic. Thanks so much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to validate Autocomplete against suggested options?
For those who may need a similar approach. Here's my solution. I've built a custom validation rule according to my needs.
Read more >
Validation errors explained - Filing candidate reports - FEC
Explanations for error messages returned when using the validator for electronic filings with the Federal Election Commission.
Read more >
How to add custom validation to a Webform element? - Drupal
The documentation described here shows two ways to define a custom validation using a hook or a Webform handler.
Read more >
Validator FAQ - Cosmos Hub
The Cosmos Hub is a public Proof-Of-Stake (PoS) blockchain, meaning that the weight of validators is determined by the amount of staking tokens...
Read more >
Verification, Updates, and Corrections - FSA Partner Connect
Also, you may at your discretion require a student to verify any FAFSA information and provide reasonable documentation according to consistently applied school ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found