Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using Plugin.ValidationRules.Interfaces;
namespace ValidationRulesTest.Validations
{
public class IsNotNullOrEmptyRule<T> : IValidationRule<T>
{
public string ValidationMessage { get; set; }
public bool Check(T value)
{
if (value == null)
{
return false;
}
var str = value as string;
return !string.IsNullOrWhiteSpace(str);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.