Skip to content

Commit 45399d7

Browse files
Update README.md
1 parent 2b6c952 commit 45399d7

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,11 @@ export default function App() {
6262
password: '',
6363
},
6464
{
65-
onChange: () => {
66-
// TODO: fix enum in backend
65+
onChange: (latestValues) => {
66+
// do something with latestValues
6767
},
68-
onSubmit: () => {
69-
console.log('no errors, submit!');
70-
// alert('no errors we can submit');
68+
onSubmit: (submittedValues) => {
69+
// do something with submittedValues
7170
},
7271
}
7372
);
@@ -129,6 +128,7 @@ export default function App() {
129128
);
130129
}
131130

131+
// you can add your own validate functions
132132
function looksLikeTelephone(str: string): boolean {
133133
if (str.length !== 10) {
134134
return false;
@@ -140,6 +140,7 @@ function looksLikeTelephone(str: string): boolean {
140140
return true;
141141
}
142142

143+
// you can add your own validate functions
143144
function looksLikeMail(str: string): boolean {
144145
let lastAtPos = str.lastIndexOf('@');
145146
let lastDotPos = str.lastIndexOf('.');

0 commit comments

Comments
 (0)