react-material-ui-form-validator
react-material-ui-form-validator copied to clipboard
Errors when testing component that include react-material-ui-form-validator
react-material-ui-form-validator v3.0.1, working fine with material ui 5 /react 18, just i have a problem when running test with vitestv1.3.1/react testing library v14 in component that have the validator (removing it solves the problem)
Error: The above error occurred in the <ForwardRef(TextField)> component:
at TextField (D:\DEV...\node_modules@mui\material\node\TextField\TextField.js:83:44) at div at TextValidator (D:\DEV...\node_modules\react-material-ui-form-validator\lib\TextValidator.js:38:9) at div at D:\DEV....\node_modules@emotion\react\dist\emotion-element-f93e57b0.cjs.dev.js:62:23 at FormControl (D:\DEV.....\node_modules@mui\material\node\FormControl\FormControl.js:92:44) at form at ValidatorForm (D:\DEV...\node_modules\react-form-validator-core\lib\ValidatorForm.js:57:9) at fieldset at AddressForm (D:\DEV......\AddressForm.tsx:19:5) at div at D:\DEV....\node_modules@emotion\react\dist\emotion-element-f93e57b0.cjs.dev.js:62:23 at Box (D:\DEV....\node_modules@mui\system\createBox.js:31:41) at div at D:\DEV.....\node_modules@emotion\react\dist\emotion-element-f93e57b0.cjs.dev.js:62:23 at Box (D:\DEV....\node_modules@mui\system\createBox.js:31:41) at Address (D:\DEV....\Address.tsx:81:11)
implementation <FormControl sx={classes.input}> <TextValidator label="a" onChange={onValChange} name="a" value={val} validators={["required"]} errorMessages={["This field is required"]} /> </FormControl>