Last active
August 25, 2018 18:37
-
-
Save ameerthehacker/a70799661d6bcab70d32e79917a50968 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" | |
xmlns:Validators="clr-namespace:XamarinFormValidation.Validators.Implementations" | |
xmlns:Behaviors="clr-namespace:XamarinFormValidation.Behaviors" | |
xmlns:local="clr-namespace:XamarinFormValidation" x:Class="XamarinFormValidation.MainPage"> | |
<StackLayout Padding="15"> | |
<Label>Enter the mobile number</Label> | |
<Entry> | |
<Entry.Behaviors> | |
<Behaviors:ValidationBehavior PropertyName="Text"> | |
<Behaviors:ValidationBehavior.Validators> | |
<Validators:RequiredValidator /> | |
<Validators:FormatValidator | |
Message="Mobile number must be 10 digit" | |
Format="^[0-9]{10}$" /> | |
</Behaviors:ValidationBehavior.Validators> | |
</Behaviors:ValidationBehavior> | |
</Entry.Behaviors> | |
</Entry> | |
</StackLayout> | |
</ContentPage> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment