using System.Globalization; using System.Windows.Controls; namespace Gestor.Common.Validation; public class ValidacaoValorMaiorQueZero : ValidationRule { public override ValidationResult Validate(object value, CultureInfo cultureInfo) { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown if (!string.IsNullOrWhiteSpace((value ?? "").ToString())) { if (!value.ToString().ValidateDouble() || (decimal)value < 0.01m) { return new ValidationResult(false, (object)"Valor Inválido"); } return ValidationResult.ValidResult; } return new ValidationResult(false, (object)"Obrigatório"); } }