Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-gao committed Jun 5, 2023
1 parent 7df9fe4 commit e326d00
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function validatePayload(array $payload, array $massaged_validates_array,
}
// 3rd step, check if the field contains correct email or phone numbers.
foreach ($original_elements as $field_id => $detail) {
if (!isset($results[$field_id])) {
if (!isset($results[$field_id]) && isset($payload[$field_id])) {
if ($detail['#type'] === 'email') {
if (v::email()->validate($payload[$field_id]) === FALSE) {
$results[$field_id] = ['Please provide a valid email address.'];
Expand Down

0 comments on commit e326d00

Please sign in to comment.