Grial-UI-Kit-Support icon indicating copy to clipboard operation
Grial-UI-Kit-Support copied to clipboard

Custom validator behavior

Open ShiroYacha opened this issue 8 years ago • 0 comments

Hi,

I think a feature like custom validator behavoir will be very cool. Basically exposing a bindable property that accepts something similar to

public interface IValidationRule<T>  
{  
    string ValidationMessage { get; set; }  
    bool Check(T value);  
}

Then we will be able to do more complex validation. Now, the email, number, textmatch validation behavior are nice but I need to implement the whole UI again if I want to just have different rules, e.g. regex text match....

And if you could make it for more controls (in the end, it is probably just an underline+invalid text display that can be also on editor, datepicker, switch, etc.) that would be even cooler 😃

Best, SY

ShiroYacha avatar Oct 10 '17 07:10 ShiroYacha