Coder Social home page Coder Social logo

Comments (6)

snewcomer avatar snewcomer commented on June 30, 2024

@jhitchins88 This seems like a phenomenal idea. Lmk if you have time for a PR!

from ember-changeset-validations.

nickschot avatar nickschot commented on June 30, 2024

@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.

jhitchins88 avatar jhitchins88 commented on June 30, 2024

@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.

musaffa avatar musaffa commented on June 30, 2024

@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.

jhitchins88 avatar jhitchins88 commented on June 30, 2024

@musaffa

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.

musaffa avatar musaffa commented on June 30, 2024

@nickschot Can you please clarify this format validation of one field in another field?

from ember-changeset-validations.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.