File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff 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
132132function 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
143144function looksLikeMail(str : string ): boolean {
144145 let lastAtPos = str .lastIndexOf (' @' );
145146 let lastDotPos = str .lastIndexOf (' .' );
You can’t perform that action at this time.
0 commit comments