using clauses cleanup
This commit is contained in:
parent
1868ed86e5
commit
7f03dd7272
292 changed files with 91 additions and 685 deletions
|
|
@ -1,5 +1,3 @@
|
|||
using System;
|
||||
|
||||
namespace Yavsc.Attributes.Validation
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
|
||||
|
|
@ -13,13 +11,13 @@ namespace Yavsc.Attributes.Validation
|
|||
public YaRequiredAttribute (string msg) : base(msg)
|
||||
{
|
||||
ErrorMessage = msg;
|
||||
}
|
||||
}
|
||||
public YaRequiredAttribute () : base("Required Field")
|
||||
{
|
||||
ErrorMessageResourceType = typeof(Yavsc.Attributes.Validation.Resources);
|
||||
ErrorMessageResourceName = "FieldRequired";
|
||||
}
|
||||
|
||||
|
||||
public override bool IsValid(object value) {
|
||||
if (value == null) {
|
||||
return false;
|
||||
|
|
@ -34,5 +32,5 @@ namespace Yavsc.Attributes.Validation
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue