fixes null string usage

main
Paul Schneider 6 years ago
parent ea5807d342
commit dafc52974a
1 changed files with 1 additions and 6 deletions

@ -27,17 +27,12 @@ namespace Yavsc.Attributes.Validation
public override bool IsValid(object value) {
if (value == null) {
return false;
}
string stringValue = value as string;
if (stringValue==null) return false;
if (stringValue==null) return MinimumLength <= 0;
if (MinimumLength>=0)
{
if (stringValue.Length< MinimumLength) {
return false;
}
}
if (maxLen>=0)

Loading…