formaze 2.0.1 → 2.0.3
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 +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ const formSchema = makeFormSchema({
|
|
|
32
32
|
password: { type: "password", minLength: { value: 8 } },
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
-
// create the form
|
|
35
|
+
// create the form component
|
|
36
36
|
const Form = createFormValidator(formSchema);
|
|
37
37
|
|
|
38
38
|
export function MyForm() {
|
|
@@ -103,9 +103,9 @@ const formSchema = makeFormSchema({
|
|
|
103
103
|
},
|
|
104
104
|
username: {
|
|
105
105
|
type: "string",
|
|
106
|
-
|
|
107
|
-
value:
|
|
108
|
-
message: "Username must
|
|
106
|
+
regex: {
|
|
107
|
+
value: /^[a-z0-9]{3,}$/ /* only lowercase letters and numbers */,
|
|
108
|
+
message: "Username must contains lowercase letters and numbers",
|
|
109
109
|
},
|
|
110
110
|
customMessage: "Username must not be empty",
|
|
111
111
|
},
|