Exemplo n.º 1
0
        void Bindable_Unfocused(object sender, FocusEventArgs e)
        {
            string textValue = ((Entry)sender).ValidatedText();
            bool   isValid   = IsRequired ? !string.IsNullOrWhiteSpace(textValue) : true;

            IsValid = Validators.CpfCnpjValidator(textValue) && isValid;
            ((Entry)sender).TextColor = IsValid ? DefaultColor : ErrorColor;
        }
Exemplo n.º 2
0
        void Bindable_Unfocused(object sender, FocusEventArgs e)
        {
            bool IsValid = Validators.CpfCnpjValidator(((Entry)sender).ValidatedText());

            ((Entry)sender).TextColor = IsValid ? DefaultColor : Color.Red;
        }