Coder Social home page Coder Social logo

@NewOldMax please check this [https://codesandbox.io/s/distracted-smoke-0gvf9](link) . I want both input field dependent to each other. about react-form-validator-core HOT 3 CLOSED

newoldmax avatar newoldmax commented on September 26, 2024
@NewOldMax please check this [https://codesandbox.io/s/distracted-smoke-0gvf9](link) . I want both input field dependent to each other.

from react-form-validator-core.

Comments (3)

NewOldMax avatar NewOldMax commented on September 26, 2024

Hi,
you can just run form whole form validation like here
If you don't need whole form validation, you can set ref for needed input and call validate manually

  handleFirstInputChange(e) {
    const { name, value } = e.target;
    this.setState(
      {
        [name]: value
      },
      () => this.secondInputRef.validate(this.secondInputRef.state.value)
    );
  }

from react-form-validator-core.

DeepakM02 avatar DeepakM02 commented on September 26, 2024

Hey @NewOldMax, Can I use validatorListener for both min and max input field in this example and pass props minNumber and maxNumber into validators?

from react-form-validator-core.

NewOldMax avatar NewOldMax commented on September 26, 2024

You can try, why not

from react-form-validator-core.

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.