How to Check the Email filed is valid when you enter your text in input field. i want to change border color when the field is valid before submitting the form. I have implemented with className getFieldError but its not working
<Form.Item
validateTrigger="onBlur"
name="Email"
label="E-mail Address"
rules={[
{
type: "email",
message: "The input is not valid E-mail!",
},
{
required: true,
message: "Please input your E-mail!",
},
{
min: 5,
message: "'Email' must be between 5 and 255 characters.",
},
]}
>
<Input className={`${(form.getFieldError('Email').length == 0 && form.getFieldValue('Email') != undefined) ? 'field-border' : ''}`} disabled={!isAdmin} />
</Form.Item>