Website: update emailAddress input validation (#33602)

Closes: #33548

Changes:
- Added `isEmail` validation to emailAddress inputs. The updated
endpoints will now return 400 responses if a user bypasses the frontend
validation.
This commit is contained in:
Eric
2025-09-29 17:26:37 -05:00
committed by GitHub
parent 04a5c933af
commit d43e71160a
5 changed files with 6 additions and 2 deletions
@@ -11,6 +11,7 @@ module.exports = {
emailAddress: {
type: 'string',
required: true,
isEmail: true,
},
fleetInstanceUrl: {
type: 'string',
@@ -11,6 +11,7 @@ module.exports = {
emailAddress: {
required: true,
isEmail: true,
type: 'string',
description: 'A return email address where we can respond.',
example: 'hermione@hogwarts.edu'
@@ -10,11 +10,11 @@ module.exports = {
inputs: {
submittersFirstName: {type: 'string'},
submittersLastName: {type: 'string'},
submittersEmailAddress: {type: 'string'},
submittersEmailAddress: {type: 'string', isEmail: true,},
submittersOrganization: {type: 'string'},
customersFirstName: {type: 'string'},
customersLastName: {type: 'string'},
customersEmailAddress: {type: 'string'},
customersEmailAddress: {type: 'string', isEmail: true,},
linkedinUrl: {type: 'string', defaultsTo: 'N/A'},
customersOrganization: {type: 'string'},
customersCurrentMdm: {type: 'string', defaultsTo: 'N/A'},
@@ -10,6 +10,7 @@ module.exports = {
inputs: {
emailAddress: {
required: true,
isEmail: true,
type: 'string',
description: 'A return email address where we can respond.',
example: 'hermione@hogwarts.edu'
+1
View File
@@ -19,6 +19,7 @@ password attempt.`,
emailAddress: {
description: 'The email to try in this attempt, e.g. "irl@example.com".',
type: 'string',
isEmail: true,
required: true
},