fable-validation


Validator<'E>

Namespace: Fable.Validation
Parent Module: Core

Constructors

ConstructorDescription
new(all)
Signature: all:bool -> Validator<'E>
[src]

CompiledName: .ctor

Instance members

Instance memberDescription
DefaultOfError(defaults input)
Signature: defaults:'T0 -> input:FieldInfo<'T,Result<'T0,'TError>,'E> -> FieldInfo<'T,'T0,'E>
Type parameters: 'T, 'TError
[src]

Defaults of Error value, it won't collect error

DefaultOfNone(defaults input)
Signature: defaults:'T0 -> (input:FieldInfo<'T,'T0 option,'E>) -> FieldInfo<'T,'T0,'E>
Type parameters: 'T
[src]

Defaults of None value, it won't collect error

End(input)
Signature: input:FieldInfo<'T,'T0,'E> -> 'T0
Type parameters: 'T0
[src]
EndAsync(input)
Signature: input:Async<FieldInfo<'T,'T0,'E>> -> Async<'T0>
Type parameters: 'T0
[src]
Enum(enums)
Signature: (enums:'T0 list) -> 'E -> FieldInfo<'T,'T0,'E> -> FieldInfo<'T,'T0,'E>
Type parameters: 'T0, 'E
[src]
Errors
Signature: Map<string,'E list>
[src]

CompiledName: get_Errors

Gt(min err)
Signature: min:'a -> err:'E -> FieldInfo<'?7908,'a,'E> -> FieldInfo<'?7908,'a,'E>
Type parameters: '?7908
[src]

Greater then a value, if err is a string, it can contains {min} to reuse first param

Gte(min err)
Signature: min:'a -> err:'E -> FieldInfo<'?7912,'a,'E> -> FieldInfo<'?7912,'a,'E>
Type parameters: '?7912
[src]

Greater and equal then a value, if err is a string, it can contains {min} to reuse first param

HasError
Signature: bool
[src]

CompiledName: get_HasError

IsDegist(error input)
Signature: error:'E -> input:FieldInfo<'T,string,'E> -> FieldInfo<'T,string,'E>
[src]
IsMail(error input)
Signature: error:'E -> input:FieldInfo<'T,string,'E> -> FieldInfo<'T,string,'E>
[src]
IsOk(error)
Signature: error:'E -> FieldInfo<'T,Result<'T0,'TError>,'E> -> FieldInfo<'T,'T0,'E>
Type parameters: 'T0, 'TError
[src]

Test a Result value is Ok and unwrap it it will collect error

IsSome(error)
Signature: error:'E -> FieldInfo<'T,'T0 option,'E> -> FieldInfo<'T,'T0,'E>
Type parameters: 'T0
[src]

Test an option value is some and unwrap it it will collect error

IsUrl(error input)
Signature: error:'E -> input:FieldInfo<'T,string,'E> -> FieldInfo<'T,string,'E>
[src]
IsValid(tester)
Signature: (tester:('T0 -> bool)) -> 'E -> FieldInfo<'T,'T0,'E> -> FieldInfo<'T,'T0,'E>
Type parameters: 'T0
[src]

Validate with a custom tester, return bool

IsValidAsync(tester)
Signature: (tester:('T0 -> Async<bool>)) -> 'E -> Async<FieldInfo<'T,'T0,'E>> -> Async<FieldInfo<'T,'T0,'E>>
Type parameters: 'T
[src]
IsValidOpt(tester error input)
Signature: (tester:('T0 -> ValidateResult<'T1>)) -> error:'E -> input:FieldInfo<'T,'T0,'E> -> FieldInfo<'T,'T1,'E>
Type parameters: 'T0, 'T1
[src]

Validate with a custom tester, return ValidateResult DU to modify input value

IsValidOptAsync(tester error input)
Signature: (tester:('T0 -> Async<ValidateResult<'T1>>)) -> error:'E -> input:Async<FieldInfo<'T,'T0,'E>> -> Async<FieldInfo<'T,'T1,'E>>
Type parameters: 'T0, 'T1
[src]
Lt(max err)
Signature: max:'a -> err:'E -> FieldInfo<'?7916,'a,'E> -> FieldInfo<'?7916,'a,'E>
Type parameters: '?7916
[src]

Less then a value, if err is a string, it can contains {max} to reuse first param

Lte(max err)
Signature: max:'a -> err:'E -> FieldInfo<'?7920,'a,'E> -> FieldInfo<'?7920,'a,'E>
Type parameters: '?7920
[src]

Less and equal then a value, if err is a string, it can contains {max} to reuse first param

Map(fn)
Signature: (fn:('T0 -> 'T1)) -> FieldInfo<'T,'T0,'E> -> FieldInfo<'T,'T1,'E>
Type parameters: 'T1, 'T
[src]

Map a function or constructor to the value, aka lift fn shouldn't throw error, if it would, please using t.To fn error

Match(regex error input)
Signature: regex:Regex -> error:'E -> input:FieldInfo<'T,string,'E> -> FieldInfo<'T,string,'E>
[src]
MaxLen(len err input)
Signature: len:int -> err:'E -> input:FieldInfo<'T,'T0,'E> -> FieldInfo<'T,'T0,'E>
Type parameters: 'T0, '?7925
[src]

Max length, if err is a string, it can contains {len} to reuse first param

MinLen(len err input)
Signature: len:int -> err:'E -> input:FieldInfo<'T,'T0,'E> -> FieldInfo<'T,'T0,'E>
Type parameters: 'T0, '?7930
[src]

Min length, if err is a string, it can contains {len} to reuse first param

NotBlank(err)
Signature: err:'E -> FieldInfo<'T,string,'E> -> FieldInfo<'T,string,'E>
[src]

Validate with String.IsNullOrWhiteSpace

PushError(name error)
Signature: name:string -> error:'E -> unit
[src]
Test(name value)
Signature: name:string -> value:'T -> FieldInfo<'T,'T,'E>
[src]
TestAsync(name value)
Signature: name:string -> value:'T -> Async<FieldInfo<'T,'T,'E>>
[src]
TestOne(value)
Signature: value:'T -> FieldInfo<'T,'T,'E>
[src]
TestOneOnlyOk(value)
Signature: value:Result<'T,'TError> -> (FieldInfo<'T,'T,'E> -> FieldInfo<'T,'T,'E>) list -> Result<'T,'TError>
Type parameters: 'TError
[src]
TestOneOnlyOkAsync(value)
Signature: value:Result<'T,'TError> -> (Async<FieldInfo<'T,'T,'E>> -> Async<FieldInfo<'T,'T,'E>>) list -> Async<Result<'T,'TError>>
Type parameters: 'TError
[src]
TestOneOnlySome(value)
Signature: (value:'T option) -> (FieldInfo<'T,'T,'E> -> FieldInfo<'T,'T,'E>) list -> 'T option
[src]
TestOneOnlySomeAsync(value)
Signature: (value:'T option) -> (Async<FieldInfo<'T,'T,'E>> -> Async<FieldInfo<'T,'T,'E>>) list -> Async<'T option>
[src]
TestOnlyOk(name value rules)
Signature: name:string -> value:Result<'T,'TError> -> (rules:(FieldInfo<'T,'T,'E> -> FieldInfo<'T,'T,'E>) list) -> Result<'T,'TError>
Type parameters: 'TError
[src]

Test rules only if value is Ok, it won't collect error if value is Error

TestOnlyOkAsync(name value rules)
Signature: name:string -> value:Result<'T,'TError> -> (rules:(Async<FieldInfo<'T,'T,'E>> -> Async<FieldInfo<'T,'T,'E>>) list) -> Async<Result<'T,'TError>>
Type parameters: 'TError
[src]

Test rules only if value is Ok, it won't collect error if value is Error

TestOnlySome(name value rules)
Signature: name:string -> (value:'T option) -> (rules:(FieldInfo<'T,'T,'E> -> FieldInfo<'T,'T,'E>) list) -> 'T option
[src]

Test rules only if value is Some, it won't collect error if value is None

TestOnlySomeAsync(name value rules)
Signature: name:string -> (value:'T option) -> (rules:(Async<FieldInfo<'T,'T,'E>> -> Async<FieldInfo<'T,'T,'E>>) list) -> Async<'T option>
[src]

Test rules only if value is Some, it won't collect error if value is None

To(fn)
Signature: (fn:('T0 -> 'T1)) -> 'E -> FieldInfo<'T,'T0,'E> -> FieldInfo<'T,'T1,'E>
Type parameters: 'T1, 'T
[src]

Convert the input value by fn if fn throws error then it will collect error

ToAsync(input)
Signature: input:FieldInfo<'T,'T0,'E> -> Async<FieldInfo<'T,'T0,'E>>
Type parameters: 'T0
[src]

Convert a synchronize validate pipe to asynchronize

Trim(input)
Signature: input:FieldInfo<'T,string,string> -> FieldInfo<'T,string,string>
[src]
Fork me on GitHub