using System.Globalization; using System.Windows.Controls; namespace Gestor.Common.Validation; public class ValidacaoEstadoObrigatorio : ValidationRule { public override ValidationResult Validate(object value, CultureInfo cultureInfo) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown //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())) { if (value.ToString().ValidateState()) { return ValidationResult.ValidResult; } return new ValidationResult(false, (object)"Estado Inválido"); } return new ValidationResult(false, (object)"Obrigatório"); } }