Skip to content

Commit 03f551b

Browse files
committed
liveValidate: mark only boolean option as deprecated
1 parent 673c3f2 commit 03f551b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/core/src/components/Form.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ import _unset from 'lodash/unset';
5656
import getDefaultRegistry from '../getDefaultRegistry';
5757
import { ADDITIONAL_PROPERTY_KEY_REMOVE, IS_RESET } from './constants';
5858

59+
/** If true, live validation will be performed on the form data after each change
60+
* @deprecated - In a future major release, this type will be removed */
61+
type LiveValidateBooleanOption = boolean;
62+
5963
/** The properties that are passed to the `Form` */
6064
export interface FormProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> {
6165
/** The JSON schema object for the form */
@@ -184,9 +188,9 @@ export interface FormProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F e
184188
* is provided, then live validation will be performed when a field that was updated is blurred (as a performance
185189
* optimization).
186190
*
187-
* @deprecated - In a future major release, the `boolean` options for this flag will be removed
191+
* NOTE: In a future major release, the `boolean` options for this flag will be removed
188192
*/
189-
liveValidate?: boolean | 'onChange' | 'onBlur';
193+
liveValidate?: LiveValidateBooleanOption | 'onChange' | 'onBlur';
190194
/** Flag that describes when live omit will be performed. Live omit happens only when `omitExtraData` is also set to
191195
* to `true` and the form's data is updated by the user.
192196
*

0 commit comments

Comments
 (0)