Home

Awesome

Entry Validator Control Plugin for Xamarin.Forms

Simple but elegant way of validate what your users write in your Xamarin.Forms projects.

Build status NuGet Donate

Setup

Android

You do not need to initialize this component.

android

iOS

You do not need to initialize this component.

ios

UWP

You do not need to initialize this component.

uwp

Platform Support

PlatformSupportedVersion
Xamarin.iOSYesiOS 7+
Xamarin.AndroidYesAPI 14+
Windows Phone SilverlightNo
Windows Phone RTYes
Windows Store RTYes
Windows 10 UWPYesBuild 10240+
Xamarin.MacNo

Usage

Instead of using an Entry simply use a ValidatorEntry instead!

You MUST set the Length value if your control is a LenghtValidator.

You can also:

Here is a sample:

new LengthValidator
{
  PlaceHolder = "Enter number of credit card",
  Lenght = 16,
  ErrorMessageColor = Color.Black,
  ShowIcon = true,
  ShowMessageError = true
}

XAML:

First add the xmlns namespace:

xmlns:validator="clr-namespace:EntryValidator.FormsPlugin.Abstractions;assembly=EntryValidator.FormsPlugin.Abstractions"

Then add the xaml:

<validator:LengthValidator 
       x:Name="length" 
       ErrorMessageColor="Black" 
       ShowIcon="True" 
       ShowMessageError="True"  
       PlaceHolder="Enter number of credit card" 
       VerticalOptions="CenterAndExpand" 
       Length="16"/>

License

Licensed under MIT, see license file