Skip to content

Commit

Permalink
fix: email validation parity for profile creation (kubeflow#7597)
Browse files Browse the repository at this point in the history
Signed-off-by: mishraprafful <mishraprafful@gmail.com>
  • Loading branch information
mishraprafful authored Jun 24, 2024
1 parent 222bec2 commit befe21a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/centraldashboard/app/api_workgroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
ERRORS,
} from './api';

// From: https://www.w3resource.com/javascript/form/email-validation.php
const EMAIL_RGX = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
// From: https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address
const EMAIL_RGX = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;

// Valid actions for handling a contributor
type ContributorActions = 'create' | 'remove';
Expand Down Expand Up @@ -391,4 +391,4 @@ export class WorkgroupApi {
this.handleContributor('remove', req, res);
});
}
}
}

0 comments on commit befe21a

Please sign in to comment.