From 0440c722a221b8068bbf388c1c0c51f0faff0451 Mon Sep 17 00:00:00 2001 From: Lucas Faria Mendes Date: Mon, 30 Mar 2026 14:17:46 -0300 Subject: some dlls --- .../Gestor.Common.Validation/ValidacaoEstado.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Gestor.Common/Gestor.Common.Validation/ValidacaoEstado.cs (limited to 'Gestor.Common/Gestor.Common.Validation/ValidacaoEstado.cs') diff --git a/Gestor.Common/Gestor.Common.Validation/ValidacaoEstado.cs b/Gestor.Common/Gestor.Common.Validation/ValidacaoEstado.cs new file mode 100644 index 0000000..90eee59 --- /dev/null +++ b/Gestor.Common/Gestor.Common.Validation/ValidacaoEstado.cs @@ -0,0 +1,18 @@ +using System.Globalization; +using System.Windows.Controls; + +namespace Gestor.Common.Validation; + +public class ValidacaoEstado : ValidationRule +{ + public override ValidationResult Validate(object value, CultureInfo cultureInfo) + { + //IL_002f: Unknown result type (might be due to invalid IL or missing references) + //IL_0035: Expected O, but got Unknown + if (string.IsNullOrWhiteSpace((value ?? "").ToString()) || value.ToString().ValidateState()) + { + return ValidationResult.ValidResult; + } + return new ValidationResult(false, (object)"Estado Inválido"); + } +} -- cgit v1.2.3