void Bindable_Unfocused(object sender, FocusEventArgs e) { bool IsValid = false; IsValid = Validators.EmailValidator(((Entry)sender).Text); ((Entry)sender).TextColor = IsValid ? Color.Default : Color.Red; }
void Bindable_Unfocused(object sender, FocusEventArgs e) { string textValue = ((Entry)sender).ValidatedText(); bool isValid = IsRequired ? !string.IsNullOrWhiteSpace(textValue) : true; IsValid = Validators.EmailValidator(textValue) && isValid; ((Entry)sender).TextColor = IsValid ? DefaultColor : ErrorColor; }