Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
145011 | Jun 1,2019 02:30 PM UTC | Jun 4,2019 11:56 AM UTC | Xamarin.Forms | 1 |
![]() |
Tags: SfTextInputLayout |
<inputLayout:SfTextInputLayout ContainerType="Outlined" Hint="Indirizzo Email" ErrorText="L'indirizzo email non è valido">
<Entry TextColor="White" Text="{Binding Email}" Keyboard="Email" IsVisible="{Binding IsNotPartner}" >
<Entry.Behaviors>
<local:EmailValitationBehavior />
</Entry.Behaviors>
</Entry>
</inputLayout:SfTextInputLayout>
private void Entry_Unfocused(object sender, FocusEventArgs e)
{
Entry inputView = (Entry)sender;
bool IsValid = (Regex.IsMatch(inputView.Text, emailRegex, RegexOptions.IgnoreCase, TimeSpan.FromMilliseconds(250)));
inputView.TextColor = IsValid ? Color.Blue : Color.Red;
model.TextHasError = !IsValid;
} |
(s.Parent.Parent.Parent as SfTextInputLayout).HasError = IsValid ? false : true; |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.