EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
April 26, 2024, 06:50:23 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for React
>
Form validation rules changes
Pages: [
1
]
« previous
next »
Print
Author
Topic: Form validation rules changes (Read 4503 times)
chrwei
Full Member
Posts: 219
Form validation rules changes
«
on:
October 16, 2019, 10:35:56 AM »
I'm trying to change the validation based on the data entered. I have my rules object in the state, and setState to change them, and using Chrome's React Developer Tools I can see my changes, but "validate(errors => {...}) still gives errors for the original rules.
how can i make fields required or optional depending on the choices of other fields?
Logged
chrwei
Full Member
Posts: 219
Re: Form validation rules changes
«
Reply #1 on:
October 16, 2019, 10:47:52 AM »
I figured out a work around, I was not rendering the FormField that was wanting to not validate, but this left it in the model and rules somehow. putting a display:none style on the FormField instead fixed this.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...