-
Notifications
You must be signed in to change notification settings - Fork 6
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
Dzhus/project fix #137
Dzhus/project fix #137
Conversation
…o parent if user enters invalid data"
@@ -18,7 +18,7 @@ public class Workshop | |||
[DataType(DataType.PhoneNumber)] | |||
[Required(ErrorMessage = "Phone number is required")] | |||
[RegularExpression( | |||
@"([\d]{9})", | |||
@"([\d]{10})", | |||
ErrorMessage = "Phone number format is incorrect. Example: 380 50-123-45-67")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to regular expression, example number should be like "0501234567"
@@ -37,11 +37,11 @@ public class Workshop | |||
public string Instagram { get; set; } = string.Empty; | |||
|
|||
[Required(ErrorMessage = "Children's min age is required")] | |||
[Range(0, 16, ErrorMessage = "Min age should be a number from 0 to 16")] | |||
[Range(0, 18, ErrorMessage = "Min age should be a number from 0 to 16")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Min age should be a number from 0 to 18. And for DTO the same
public int MinAge { get; set; } | ||
|
||
[Required(ErrorMessage = "Children's max age is required")] | ||
[Range(0, 16, ErrorMessage = "Max age should be a number from 0 to 16")] | ||
[Range(0, 18, ErrorMessage = "Max age should be a number from 0 to 16")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Max age should be a number from 0 to 18. And for DTO the same
SonarCloud Quality Gate failed. |
No description provided.