🍊
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user