Last active
August 25, 2018 15:50
-
-
Save ameerthehacker/75cd4fd377e2aa92fe1349f7fb463188 to your computer and use it in GitHub Desktop.
Xamarin Behavior for validating an element
This file contains 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
using Xamarin.Forms; | |
using System.Collections.ObjectModel; | |
using XamarinFormValidation.Validators.Contracts; | |
using XamarinFormValidation.Validators.Implementations; | |
using System.ComponentModel; | |
namespace XamarinFormValidation.Behaviors | |
{ | |
public class ValidationBehavior : Behavior<View> | |
{ | |
IErrorStyle _style = new BasicErrorStyle(); | |
View _view; | |
public string PropertyName { get; set; } | |
public ObservableCollection<IValidator> Validators { get; set; } = new ObservableCollection<IValidator>(); | |
... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment