|
@@ -39,7 +39,12 @@ namespace CheckArticlesForSpam.ViewModels
|
|
|
|
|
|
public User SaveChanges()
|
|
|
{
|
|
|
- if (!Regex.IsMatch(Phone, @"^(?:\+7|8)\d{10}$"))
|
|
|
+ if (string.IsNullOrEmpty(Login) || string.IsNullOrEmpty(UserName) || string.IsNullOrEmpty(Password) || string.IsNullOrEmpty(Phone))
|
|
|
+ {
|
|
|
+ Message = "Çàïîëíèòå âñå ïîëÿ";
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ else if (!Regex.IsMatch(Phone, @"^(?:\+7|8)\d{10}$"))
|
|
|
{
|
|
|
Message = "Ââåäèòå êîððåêòíûé òåëåôîí";
|
|
|
return null;
|