blob: ba91173e4b8b89bf468845256595ffaf244ca01f (
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 ValidacaoObrigatorio : ValidationRule
{
public override ValidationResult Validate(object value, CultureInfo cultureInfo)
{
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Expected O, but got Unknown
if (!string.IsNullOrWhiteSpace((value ?? "").ToString()))
{
return ValidationResult.ValidResult;
}
return new ValidationResult(false, (object)"OBRIGATÓRIO");
}
}
|