blob: fb24158ed8fa7864490349d2c5adce8bcbe3667b (
plain)
| ofs | hex dump | ascii |
|---|
| 0000 | 00 00 01 00 06 00 00 00 00 00 01 00 20 00 5a 87 00 00 66 00 00 00 80 80 00 00 01 00 20 00 28 08 | ..............Z...f...........(. |
| 0020 | 01 00 c0 87 00 00 40 40 00 00 01 00 20 00 28 42 00 00 e8 8f 01 00 30 30 00 00 01 00 20 00 a8 25 | ......@@......(B......00.......% |
| 0040 | 00 00 10 d2 01 00 20 20 00 00 01 00 20 00 a8 10 00 00 b8 f7 01 00 10 10 00 00 01 00 20 00 68 04 | ..............................h. |
| 0060 | 00 00 60 08 02 00 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 01 00 00 00 01 00 08 06 | ..`....PNG........IHDR.......... |
| 0080 | 00 00 00 5c 72 a8 66 00 00 80 00 49 44 41 54 78 da ec fd 77 98 65 e9 59 de 0b ff 56 4e 3b ef ca | ...\r.f....IDATx...w.e.Y...VN;.. |
| 00a0 | 55 5d dd 5d 1d a6 27 f6 8c 34 a3 09 8a a3 80 84 10 02 6c 10 b6 30 d8 7c e0 0b 2c b0 05 f8 7c 18 | U].]..'..4........l..0.|..,...|. |
| 00c0 | 0b 63 c0 18 fb 1c 7using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
namespace Tango.MachineStudio.Common.ValidationRules
{
/// <summary>
/// Represents a required field validation rule.
/// </summary>
/// <seealso cref="System.Windows.Controls.ValidationRule" />
public class Required : ValidationRule
{
/// <summary>
/// When overridden in a derived class, performs validation checks on a value.
/// </summary>
/// <param name="value">The value from the binding target to check.</param>
/// <param name="cultureInfo">The culture to use in this rule.</param>
/// <returns>
/// A <see cref="T:System.Windows.Controls.ValidationResult" /> object.
/// </returns>
public override ValidationResult Validate(object value, CultureInfo cultureInfo)
{
return new ValidationResult(!String.IsNullOrWhiteSpace(value.ToStringSafe()), "Required");
}
}
}
|