private bool IsValidated() => !string.IsNullOrWhiteSpace(nameTextBox.Text) && !string.IsNullOrWhiteSpace(phoneTextBox.Text) && !Validator.GetHasError(nameTextBox) && !Validator.GetHasError(phoneTextBox) && hourCB.SelectedItem != null && minuteCB.SelectedItem != null && dateSelector.SelectedDate != null;
/// <summary> /// Removes all errors from the specified element. /// </summary> /// <param name="element">The element to remove errors from.</param> public static void ClearInvalid(DependencyObject element) { var errorsToRemove = WValidation.GetErrors(element) .ToArray(); foreach (var error in errorsToRemove) { removeValidationError.Invoke(null, new object[] { error, element, true }); } }