Skip to content

Conversation

@Luchiweb
Copy link
Collaborator

Add validation functions

Description of changes 🗣️

added folder with functions for validation of inputs

Related Tasks 🔗

N/A

Special Instructions for the Reviewers☝🏻

N/A

Additional Information 📚

N/A

@Luchiweb Luchiweb added this to the Sprint 2 milestone Aug 14, 2023
@Luchiweb Luchiweb self-assigned this Aug 14, 2023
export function validateEmail(email: string): ValidationResult {
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;

if (!email) return { isValid: false, message: 'This field is required.' };
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if there is a perspective for adding different languages, then it is better to put such text in a separate file

@akrutsko akrutsko merged commit 247e33d into login-registration-main Aug 14, 2023
Luchiweb added a commit that referenced this pull request Aug 16, 2023
Luchiweb added a commit that referenced this pull request Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done (Sprint 2)

Development

Successfully merging this pull request may close these issues.

6 participants