Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Added a guard clause for invalid emails #86

Open
wants to merge 1 commit into
base: broken-develop
Choose a base branch
from

Conversation

rbacordio
Copy link
Contributor

This pull request addresses the issue on the Account controller specifically on the create account endpoint by introducing a guard clause to prevent creating accounts with invalid emails.

Copy link
Contributor

@JMark-FS JMark-FS left a comment

Choose a reason for hiding this comment

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

You can use the [EmailAddress] Data annotation for the email property.

	[Required]
	[MaxLength(50)]
	[EmailAddress] // Add this line of code in the AccountCreateDto
	public string Email { get; set; }

Copy link
Contributor

@jaymar921 jaymar921 left a comment

Choose a reason for hiding this comment

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

Looks good to me, just implement what's JM suggested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants