You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
602 B
21 lines
602 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
|
|
namespace SiaSun.LMS.WPFClient.UC.Validate
|
|
{
|
|
public class ValidateNullEmptyRule:ValidationRule
|
|
{
|
|
public override ValidationResult Validate(object value, System.Globalization.CultureInfo cultureInfo)
|
|
{
|
|
if (string.IsNullOrEmpty((string)value))
|
|
{
|
|
return new ValidationResult(false,string.Format("不允许空值"));
|
|
}
|
|
return ValidationResult.ValidResult;
|
|
}
|
|
}
|
|
}
|