private void OnTextChanged(object sender, TextChangedEventArgs args) { var entry = (Entry)sender; IsValid = !string.IsNullOrEmpty(args.NewTextValue); entry.BackgroundColor = ValidationErrorColors.Validate(IsValid); }
void HandleTextChanged(object sender, TextChangedEventArgs e) { var password = CompareToEntry.Text; var confirmPassword = e.NewTextValue; IsValid = password.Equals(confirmPassword); ((Entry)sender).BackgroundColor = ValidationErrorColors.Validate(IsValid); }
void HandleTextChanged(object sender, TextChangedEventArgs e) { IsValid = (Regex.IsMatch(e.NewTextValue, emailRegex, RegexOptions.IgnoreCase, TimeSpan.FromMilliseconds(250))); ((Entry)sender).BackgroundColor = ValidationErrorColors.Validate(IsValid); }