Esempio n. 1
0
 internal static string ValidateRequired(string propertyName, string propertyValue)
 {
     if (StringValidation.IsStringMissing(propertyValue))
     {
         return(propertyName + Resources.Error_Missing_Required_Field);
     }
     return(null);
 }
Esempio n. 2
0
 internal static string ValidateUrl(string urlValue, bool isRequired)
 {
     if (StringValidation.IsStringMissing(urlValue))
     {
         return(isRequired ? Resources.Error_MissingUrl : null);
     }
     else if (!StringValidation.IsValidUrl(urlValue))
     {
         return(Resources.Error_InvalidUrl);
     }
     return(null);
 }
Esempio n. 3
0
 internal static string ValidateEmail(string emailValue, bool isRequired)
 {
     if (StringValidation.IsStringMissing(emailValue))
     {
         return(isRequired ? Resources.Error_Missing_Email : null);
     }
     else if (!StringValidation.IsValidEmail(emailValue))
     {
         return(Resources.Error_Invalid_Email_Format);
     }
     return(null);
 }
Esempio n. 4
0
 internal static string ValidatePhone(string phoneValue, bool isRequired)
 {
     if (StringValidation.IsStringMissing(phoneValue))
     {
         return(isRequired ? Resources.Error_Missing_Phone : null);
     }
     else if (!StringValidation.IsValidPhone(phoneValue))
     {
         return(Resources.Error_Invalid_Phone);
     }
     return(null);
 }