react-mui-form-validator 1.5.4 → 1.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +2 -7
- package/package.json +1 -1
package/Readme.md
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
## Validation component for material-ui forms
|
|
3
2
|
|
|
4
3
|
[](https://opensource.org/licenses/MIT)
|
|
@@ -58,12 +57,8 @@ export default function App(props: any) {
|
|
|
58
57
|
placeholder="example@domain.com"
|
|
59
58
|
onChange={(v) => setEmail(v.target.value)}
|
|
60
59
|
value={email}
|
|
61
|
-
validators={[
|
|
62
|
-
|
|
63
|
-
validator: "isEmail",
|
|
64
|
-
},
|
|
65
|
-
]}
|
|
66
|
-
errorMessages={["Email is required"]}
|
|
60
|
+
validators={[{ validator: "required" }, { validator: "isEmail" }]}
|
|
61
|
+
errorMessages={["Email required", "Enter a valid email"]}
|
|
67
62
|
fullWidth
|
|
68
63
|
/>
|
|
69
64
|
<br />
|