ValidateScripts
Assembly: ServiceStack.dll
View Source
public class ValidateScripts : ScriptMethods
Properties
RequiredValidators
View Source
public static HashSet<string> RequiredValidators { get; }
Inherited Properties
Context
View Source
public ScriptContext Context { get; set; }
InvokerCache
View Source
public ConcurrentDictionary<string, MethodInvoker> InvokerCache { get; }
Pages
View Source
public ISharpPages Pages { get; set; }
Fields
Instance
View Source
public static ValidateScripts Instance
Methods
Null()
View Source
public IPropertyValidator Null()
Returns
ServiceStack.FluentValidation.Validators.IPropertyValidator
Empty()
View Source
public IPropertyValidator Empty()
Returns
ServiceStack.FluentValidation.Validators.IPropertyValidator
Empty(Object)
View Source
public IPropertyValidator Empty(object defaultValue)
Returns
ServiceStack.FluentValidation.Validators.IPropertyValidator
Parameters
Type | Name |
---|---|
System.Object | defaultValue |
Equal(Object)
View Source
public IPropertyValidator Equal(object value)
Returns
ServiceStack.FluentValidation.Validators.IPropertyValidator
Parameters
Type | Name |
---|---|
System.Object | value |
NotNull()
View Source
public IPropertyValidator NotNull()
Returns
ServiceStack.FluentValidation.Validators.IPropertyValidator
NotEmpty()
View Source
public IPropertyValidator NotEmpty()
Returns
ServiceStack.FluentValidation.Validators.IPropertyValidator
NotEmpty(Object)
View Source
public IPropertyValidator NotEmpty(object defaultValue)
Returns
ServiceStack.FluentValidation.Validators.IPropertyValidator
Parameters
Type | Name |
---|---|
System.Object | defaultValue |
NotEqual(Object)
View Source
public IPropertyValidator NotEqual(object value)
Returns
ServiceStack.FluentValidation.Validators.IPropertyValidator
Parameters
Type | Name |
---|---|
System.Object | value |
CreditCard()
View Source
public IPropertyValidator CreditCard()
Returns
ServiceStack.FluentValidation.Validators.IPropertyValidator
Email()
View Source
public IPropertyValidator Email()
Returns
ServiceStack.FluentValidation.Validators.IPropertyValidator
Length(Int32, Int32)
View Source
public IPropertyValidator Length(int min, int max)
Returns
ServiceStack.FluentValidation.Validators.IPropertyValidator
Parameters
Type | Name |
---|---|
System.Int32 | min |
System.Int32 | max |
ExactLength(Int32)
View Source
public IPropertyValidator ExactLength(int length)
Returns
ServiceStack.FluentValidation.Validators.IPropertyValidator
Parameters
Type | Name |
---|---|
System.Int32 | length |
MaximumLength(Int32)
View Source
public IPropertyValidator MaximumLength(int max)
Returns
ServiceStack.FluentValidation.Validators.IPropertyValidator
Parameters
Type | Name |
---|---|
System.Int32 | max |
MinimumLength(Int32)
View Source
public IPropertyValidator MinimumLength(int min)
Returns
ServiceStack.FluentValidation.Validators.IPropertyValidator
Parameters
Type | Name |
---|---|
System.Int32 | min |
InclusiveBetween(IComparable, IComparable)
View Source
public IPropertyValidator InclusiveBetween(IComparable from, IComparable to)
Returns
ServiceStack.FluentValidation.Validators.IPropertyValidator
Parameters
Type | Name |
---|---|
System.IComparable | from |
System.IComparable | to |
ExclusiveBetween(IComparable, IComparable)
View Source
public IPropertyValidator ExclusiveBetween(IComparable from, IComparable to)
Returns
ServiceStack.FluentValidation.Validators.IPropertyValidator
Parameters
Type | Name |
---|---|
System.IComparable | from |
System.IComparable | to |
LessThan(Int32)
View Source
public IPropertyValidator LessThan(int value)
Returns
ServiceStack.FluentValidation.Validators.IPropertyValidator
Parameters
Type | Name |
---|---|
System.Int32 | value |
LessThanOrEqual(Int32)
View Source
public IPropertyValidator LessThanOrEqual(int value)
Returns
ServiceStack.FluentValidation.Validators.IPropertyValidator
Parameters
Type | Name |
---|---|
System.Int32 | value |
GreaterThan(Int32)
View Source
public IPropertyValidator GreaterThan(int value)
Returns
ServiceStack.FluentValidation.Validators.IPropertyValidator
Parameters
Type | Name |
---|---|
System.Int32 | value |
GreaterThanOrEqual(Int32)
View Source
public IPropertyValidator GreaterThanOrEqual(int value)
Returns
ServiceStack.FluentValidation.Validators.IPropertyValidator
Parameters
Type | Name |
---|---|
System.Int32 | value |
ScalePrecision(Int32, Int32)
View Source
public IPropertyValidator ScalePrecision(int scale, int precision)
Returns
ServiceStack.FluentValidation.Validators.IPropertyValidator
Parameters
Type | Name |
---|---|
System.Int32 | scale |
System.Int32 | precision |
RegularExpression(String)
View Source
public IPropertyValidator RegularExpression(string regex)
Returns
ServiceStack.FluentValidation.Validators.IPropertyValidator
Parameters
Type | Name |
---|---|
System.String | regex |
Enum(Type)
View Source
public IPropertyValidator Enum(Type enumType)
Returns
ServiceStack.FluentValidation.Validators.IPropertyValidator
Parameters
Type | Name |
---|---|
System.Type | enumType |
IsAuthenticated()
View Source
public ITypeValidator IsAuthenticated()
Returns
IsAuthenticated(String)
View Source
public ITypeValidator IsAuthenticated(string provider)
Returns
Parameters
Type | Name |
---|---|
System.String | provider |
HasRole(String)
View Source
public ITypeValidator HasRole(string role)
Returns
Parameters
Type | Name |
---|---|
System.String | role |
HasRoles(String[])
View Source
public ITypeValidator HasRoles(string[] roles)
Returns
Parameters
Type | Name |
---|---|
System.String[] | roles |
HasPermission(String)
View Source
public ITypeValidator HasPermission(string permission)
Returns
Parameters
Type | Name |
---|---|
System.String | permission |
HasPermissions(String[])
View Source
public ITypeValidator HasPermissions(string[] permission)
Returns
Parameters
Type | Name |
---|---|
System.String[] | permission |
IsAdmin()
View Source
public ITypeValidator IsAdmin()
Returns
Inherited Methods
GetInvoker(String, Int32, InvokerType)
View Source
public MethodInvoker GetInvoker(string name, int argsCount, InvokerType type)
Returns
Parameters
Type | Name |
---|---|
System.String | name |
System.Int32 | argsCount |
ServiceStack.Script.InvokerType | type |
QueryFilters(String)
View Source
public List<MethodInfo> QueryFilters(string filterName)
Returns
System.Collections.Generic.List<System.Reflection.MethodInfo>
Parameters
Type | Name |
---|---|
System.String | filterName |