REORG
This commit is contained in:
parent
8d68ee380a
commit
45514010f2
3505 changed files with 154 additions and 523 deletions
|
|
@ -1,32 +0,0 @@
|
|||
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Server.Helpers;
|
||||
|
||||
namespace Yavsc.Attributes.Validation
|
||||
{
|
||||
/// <summary>
|
||||
/// Valid Remote User Dir Attribute
|
||||
/// </summary>
|
||||
public class ValidRemoteUserFilePathAttribute : ValidationAttribute
|
||||
{
|
||||
public ValidRemoteUserFilePathAttribute()
|
||||
{
|
||||
UseDefaultErrorMessage();
|
||||
}
|
||||
void UseDefaultErrorMessage()
|
||||
{
|
||||
if (ErrorMessageResourceType==null) {
|
||||
ErrorMessageResourceType = typeof(Yavsc.Attributes.Validation.Resources);
|
||||
ErrorMessageResourceName = "InvalidPath";
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsValid(object value)
|
||||
{
|
||||
if (value == null) return true;
|
||||
var str = (string) value;
|
||||
return str.IsValidYavscPath();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue