blob: 0a5eb46d34afb3402ed2bcc7b6225daa0575f0f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
using System.Globalization;
using System.Windows.Controls;
namespace Gestor.Common.Validation;
public class ValidacaoInt : 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().ValidateInt())
{
return ValidationResult.ValidResult;
}
return new ValidationResult(false, (object)"Número Inválido");
}
}
|