Comments (7)
https://codesandbox.io/s/validatepaireddate-71b7pt?file=/App.js
See this example working ^^^^
from informed.
Are you using paired validation ??? https://teslamotors.github.io/informed/?path=/story/validation--paired-validation
from informed.
you should not be trying to use useField or useFieldState at this point. Create your custom inputs once with useField and then you should never be touching that hook again.
from informed.
<Input
name="password"
id="notify-password"
validate={validatePassword}
validateOnChange
validateWhen={['confirmPassword']}
/>
<Input
name="confirmPassword"
id="notify-confirm-password"
validate={validateConfim}
validateOnChange
validateWhen={['password']}
/>
<button type="submit">Submit</button>
</Form>;
from informed.
Are you using paired validation ??? https://teslamotors.github.io/informed/?path=/story/validation--paired-validation
@joepuzzo
Both the select fields will have same validate function. In validate function we compare the user selected start date and end date values, if startDate > endDate will return an error.
We have used validateWhen
, but also we couldn't achieve the desired output.
from informed.
did you do exactly as the docs show? Can you recreate issue in a code sandbox https://teslamotors.github.io/informed/?path=/story/playground--format-example
from informed.
https://codesandbox.io/s/validatepaireddate-71b7pt?file=/App.js
See this example working ^^^^
its working. Thankyou @joepuzzo
from informed.
Related Issues (20)
- Add React 18 peer dependency HOT 2
- onSubmit type definition HOT 2
- Parent state resetting when Child is unmounted HOT 3
- onChange, how to get access to all field event properties? HOT 5
- Support for SSR on useFormStateSelector HOT 2
- React has detected a change in the order of Hooks called by Root HOT 1
- Guidance needed for customizing Radio HOT 5
- Problem with custom Radio input HOT 3
- TypeScript - Examples of using unknown types? HOT 4
- Console log displayed when input has mask HOT 2
- onSubmit - setError is not a function HOT 1
- Missed some properties in FormApi type HOT 1
- `useField` does not return initial value on first render HOT 12
- TextArea - attribute HOT 3
- Q: Form with several buttons HOT 2
- File Input Field? HOT 1
- Zod support HOT 1
- onSubmit with Multi-Step? HOT 1
- fieldExists is missing HOT 2
- upon using npm run dev command its throwing an error HOT 27
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 informed.