This commit is contained in:
E
2021-03-07 20:56:20 -07:00
parent 1e8d655d1d
commit b0aec2cfd1
5 changed files with 61 additions and 55 deletions
+3
View File
@@ -1,3 +1,4 @@
import { message } from 'antd'
import { Content } from 'antd/lib/layout/layout'
import React, { FormEvent } from 'react'
import { useState } from 'react'
@@ -24,6 +25,7 @@ export const Dashboard = () => {
if (phone.length < 10) {
// helpful message
message.error('Check all fields!')
setError('Phone number needs to be a length of at least 10')
return
}
@@ -44,6 +46,7 @@ export const Dashboard = () => {
<label htmlFor="name">
Name:
<input
minLength={3}
value={name}
onChange={(e) => setName(e.target.value)}
name="name"