Back to all questions
Native browser validation does not work in some components, what should I do?
Last updated
Native browser validation
Native browser validation works with most of Mantine inputs, for example, it can be used with TextInput, Textarea, NativeSelect and other components.
However, some components like Select, MultiSelect, Slider or DatePicker do not support native browser validation. These components provide custom UI elements for data input and browsers do not treat them as native inputs.
Is there a workaround to use native browser validation?
No, there is no workaround to use native browser validation for components with custom UI elements.
What should I do instead?
If you are building a form that requires usage of Mantine inputs with custom UI, you should validate form data after it has been submitted. You can use @mantine/form package to perform form validation on submit.