Created
October 26, 2017 22:38
-
-
Save Char0394/7f5998c49d923e3b24c70594bf72dad9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
| x:Class="EntryValidationBorder.MainPage" | |
| xmlns:local="clr-namespace:EntryValidationBorder" | |
| xmlns:behavior="clr-namespace:EntryValidationBorder.Behavior"> | |
| <ContentPage.Content> | |
| <StackLayout VerticalOptions="CenterAndExpand" Padding="20" x:Name="layout"> | |
| <local:ExtendedEntry Placeholder="Name" ErrorText="{Binding User.FirstName.NotValidMessageError}" | |
| BorderErrorColor="Red" | |
| Text="{Binding User.FirstName.Name}" | |
| HeightRequest="40" | |
| IsBorderErrorVisible="{Binding User.FirstName.IsNotValid, Mode=TwoWay}"> | |
| <local:ExtendedEntry.Behaviors> | |
| <behavior:EmptyEntryValidatorBehavior /> | |
| </local:ExtendedEntry.Behaviors> | |
| </local:ExtendedEntry> | |
| <local:ExtendedEntry Placeholder="Email" ErrorText="{Binding User.Email.NotValidMessageError}" | |
| BorderErrorColor="Red" | |
| Text="{Binding User.Email.Name}" | |
| HeightRequest="40" | |
| IsBorderErrorVisible="{Binding User.Email.IsNotValid, Mode=TwoWay}"> | |
| <local:ExtendedEntry.Behaviors> | |
| <behavior:EmptyEntryValidatorBehavior /> | |
| </local:ExtendedEntry.Behaviors> | |
| </local:ExtendedEntry> | |
| <local:ExtendedEntry Placeholder="Password" ErrorText="{Binding User.Password.NotValidMessageError}" | |
| BorderErrorColor="Red" IsPassword="true" | |
| Text="{Binding User.Password.Name}" | |
| HeightRequest="40" | |
| IsBorderErrorVisible="{Binding User.Password.IsNotValid, Mode=TwoWay}"> | |
| <local:ExtendedEntry.Behaviors> | |
| <behavior:EmptyEntryValidatorBehavior /> | |
| </local:ExtendedEntry.Behaviors> | |
| </local:ExtendedEntry> | |
| <Button Text="Enter" | |
| Command="{Binding OnValidationCommand}" | |
| BackgroundColor="Black" | |
| HorizontalOptions="FillAndExpand" | |
| TextColor="White"/> | |
| </StackLayout> | |
| </ContentPage.Content> | |
| </ContentPage> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment