Comments (6)
@jhitchins88 This seems like a phenomenal idea. Lmk if you have time for a PR!
from ember-changeset-validations.
@jhitchins88 how did you write this validator? Don't the validators only receive the key and the value of the property that is validated?
I'm very interested in this (and a similar validator where at least one of several fields must be present/have a specific format).
from ember-changeset-validations.
@snewcomer I should be able to do it. I'll work it up into a PR soon.
@nickschot I used the changes
and content
(4th and 5th parameters) passed into the validator function. Those let you look at the whole changeset.
from ember-changeset-validations.
@nickschot a similar validator where at least one of several fields must be present/have a specific format
@jhitchins88 Can you add this feature as well?
from ember-changeset-validations.
I'd need a little more description of "have a specific format", but I'd be down if we know what that looks like. If it gets too much more complicated, we should probably break this functionality into its own validator, or have some way to do conditionals in the validations
file, like #116 suggests. This on
option is basically just a fancy, specific conditional, that could be replaced with a general conditional for any validator in the future.
from ember-changeset-validations.
@nickschot Can you please clarify this format validation of one field in another field?
from ember-changeset-validations.
Related Issues (20)
- Feature request - sequential validations HOT 8
- Feature request - add a tracked isValidating flag for properties with async validations HOT 1
- async validator is called multiple times with the same value HOT 2
- Date validator does not respect 'rawOutput' option HOT 2
- async validators can complete out of order HOT 4
- Documentation for rawOutput
- (Octane) skipValidate=true in helper does not work HOT 2
- (Octane) Documentation update suggestion: passing the validation instance HOT 1
- ember inspector silently polluting `changes`? HOT 1
- Button attribute not updating using classic components syntax HOT 1
- Access Service from validator class
- Freezed value in Input HOT 5
- Update to ember-validates v4 is breaking change HOT 2
- allowBlank doesn't work with validateFormat() HOT 1
- [Proposal] Use isEmpty for the date validator's allowBlank alike the other validators
- Use of `assign` has been deprecated
- [rfc]: Externalize schema validation HOT 4
- Strange behavior with an array of objects HOT 2
- Dependent field validation capability
- Docs pages are missing
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 ember-changeset-validations.