@@ -9,15 +9,14 @@ import {
9
9
StandardSchema ,
10
10
ValidationResult ,
11
11
} from '../types' ;
12
- import { normalizeProps , useUniqId , warn , useCaptureProps } from '../utils/common' ;
12
+ import { normalizeProps , useUniqId , warn , useCaptureProps , toPrimitiveBooleanValue } from '../utils/common' ;
13
13
import { FormKey } from '../useForm' ;
14
14
import { useValidationProvider } from '../validation/useValidationProvider' ;
15
15
import { FormValidationMode } from '../useForm/formContext' ;
16
16
import { prefixPath as _prefixPath } from '../utils/path' ;
17
17
import { getConfig } from '../config' ;
18
18
import { createPathPrefixer , usePathPrefixer } from '../helpers/usePathPrefixer' ;
19
19
import { createDisabledContext } from '../helpers/createDisabledContext' ;
20
- import { TransparentWrapper } from '../types' ;
21
20
22
21
export interface FormGroupProps < TInput extends FormObject = FormObject , TOutput extends FormObject = TInput > {
23
22
/**
@@ -43,7 +42,8 @@ export interface FormGroupProps<TInput extends FormObject = FormObject, TOutput
43
42
/**
44
43
* Whether HTML5 validation should be disabled for this form group.
45
44
*/
46
- disableHtmlValidation ?: TransparentWrapper < boolean > ;
45
+ // eslint-disable-next-line @typescript-eslint/no-wrapper-object-types
46
+ disableHtmlValidation ?: Boolean ;
47
47
}
48
48
49
49
interface GroupProps extends AriaLabelableProps {
@@ -84,7 +84,9 @@ export function useFormGroup<TInput extends FormObject = FormObject, TOutput ext
84
84
const parentGroup = inject ( FormGroupKey , null ) ;
85
85
const isDisabled = createDisabledContext ( props . disabled ) ;
86
86
const isHtmlValidationDisabled = ( ) =>
87
- toValue ( props . disableHtmlValidation ) ?? form ?. isHtmlValidationDisabled ( ) ?? getConfig ( ) . disableHtmlValidation ;
87
+ toPrimitiveBooleanValue ( props . disableHtmlValidation ) ??
88
+ form ?. isHtmlValidationDisabled ( ) ??
89
+ getConfig ( ) . disableHtmlValidation ;
88
90
const { validate, onValidationDispatch, defineValidationRequest, onValidationDone, dispatchValidateDone } =
89
91
useValidationProvider ( {
90
92
getValues : ( ) => getValue ( ) ,
0 commit comments