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/Gestor.Common.Validation/ValidacaoCep.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Gestor.Common/Gestor.Common.Validation/ValidacaoCep.cs (limited to 'Gestor.Common/Gestor.Common.Validation/ValidacaoCep.cs') diff --git a/Gestor.Common/Gestor.Common.Validation/ValidacaoCep.cs b/Gestor.Common/Gestor.Common.Validation/ValidacaoCep.cs new file mode 100644 index 0000000..71a0f0c --- /dev/null +++ b/Gestor.Common/Gestor.Common.Validation/ValidacaoCep.cs @@ -0,0 +1,18 @@ +using System.Globalization; +using System.Windows.Controls; + +namespace Gestor.Common.Validation; + +public class ValidacaoCep : 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().ValidatePostCode()) + { + return ValidationResult.ValidResult; + } + return new ValidationResult(false, (object)"CEP Inválido"); + } +} -- cgit v1.2.3