fixes null string usage
This commit is contained in:
parent
5de24ca5e5
commit
07ff75a1cf
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…
Add table
Add a link
Reference in a new issue