Exemple #1
0
        public override ValidationResult Validate(object value, CultureInfo cultureInfo)
        {
            GeneralName generalName;

            if (GeneralName.TryParse(value.ToString(), out generalName))
            {
                return(new ValidationResult(true, ""));
            }
            else
            {
                return(new ValidationResult(false, "Not a valid Name"));
            }
        }
Exemple #2
0
        public override ValidationResult Validate(object value, CultureInfo cultureInfo)
        {
            GeneralName generalName;

            if (GeneralName.TryParse(value.ToString(), out generalName) && !ServiceLocator.Instance.TeamService.NameExist(generalName.Value))
            {
                return(new ValidationResult(true, ""));
            }
            else
            {
                return(new ValidationResult(false, "Not a valid Name"));
            }
        }
Exemple #3
0
 private void serieName_TextChanged(object sender, TextChangedEventArgs e)
 {
     if (string.IsNullOrWhiteSpace(serieName.Text))
     {
         nameIsValid = false;
     }
     else
     {
         GeneralName result;
         if (GeneralName.TryParse(serieName.Text, out result))
         {
             nameIsValid = true;
         }
         else
         {
             nameIsValid = false;
         }
     }
     ToggleCreateMatchScheduleButton();
 }