-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add error messaging to boundary form and update error messaging
- Loading branch information
Showing
2 changed files
with
10 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,12 +11,16 @@ import { FormProps } from "."; | |
export default function ContactForm({ formikConfig, onSuccess }: FormProps) { | ||
const formSchema = Yup.object().shape({ | ||
helpEmail: Yup.string() | ||
.email("Enter a valid email address") | ||
.email( | ||
"Enter an email address in the correct format, like [email protected]", | ||
) | ||
.required("Enter a help email address"), | ||
helpPhone: Yup.string().required("Enter a help phone number"), | ||
helpOpeningHours: Yup.string().required("Enter your opening hours"), | ||
homepage: Yup.string() | ||
.url("Enter a valid URL") | ||
.url( | ||
"Enter a homepage URL in the correct format, like https://www.localauthority.gov.uk/", | ||
) | ||
.required("Enter a homepage"), | ||
}); | ||
|
||
|