2 Commits
Author SHA1 Message Date
auto b00b857f29 Add "Apply for staff" link to homepage
This commit enhances the homepage by adding a new link to the "Apply for staff" page, making it easier for visitors to find and access staff application information directly from the main page. The new link is placed alongside the existing "Contact us" link for better visibility.
2024-08-11 18:32:57 +02:00
auto cf7bdeb481 Enforce integer validation on age and average time fields
Added integer validation messages to the age and avg_time fields to ensure users enter whole numbers. This enhances the form's data integrity by preventing input errors.
2024-08-10 04:35:54 +02:00
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -163,6 +163,7 @@ export const apply: FormData = {
age: Yup.number() age: Yup.number()
.typeError('Input must be a number') .typeError('Input must be a number')
.integer('Please enter a whole number')
.min(0, 'Please enter a valid age') .min(0, 'Please enter a valid age')
.max(999, 'We do not accept players older than 999 years old sorry!') .max(999, 'We do not accept players older than 999 years old sorry!')
.required('You are required to fill out your age'), .required('You are required to fill out your age'),
@@ -175,6 +176,7 @@ export const apply: FormData = {
avg_time: Yup.number() avg_time: Yup.number()
.typeError('Please enter a number') .typeError('Please enter a number')
.integer('Please enter a whole number')
.min(0, 'Please enter a positive number') .min(0, 'Please enter a positive number')
.max(168, 'There are only 168 hours in a week') .max(168, 'There are only 168 hours in a week')
.required('Please enter the average time you will be available each week'), .required('Please enter the average time you will be available each week'),
+1
View File
@@ -11,6 +11,7 @@ const Home: FunctionComponent = () => {
<header className="App-header"> <header className="App-header">
<h1>Welcome to the Altitude forms page</h1> <h1>Welcome to the Altitude forms page</h1>
<h2><a href="/contact">Contact us.</a></h2> <h2><a href="/contact">Contact us.</a></h2>
<h2><a href="/apply">Apply for staff.</a></h2>
</header> </header>
</div> </div>
); );