Validating Signals
Signals in Gjallarhorn also provide a mechanism to filter based on validation rules. A review of the basics of validation in Gjallarhorn prior to reading this section will be beneficial.
Signal.validate
allows you to filter a Signal into an IValidatedSignal<'a,'b>
, which provides the following new properties:
ValidationResult
: aISignal<ValidationResult>
with details of the validation of the current value of the viewIsValid
: a boolean of whether the current view's value is validRawInput
: aISignal<'a>
with the raw, unvalidated input
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: |
|
val source : obj
Full name: Validate_types.source
Full name: Validate_types.source
val test : obj
Full name: Validate_types.test
Full name: Validate_types.test
val printfn : format:Printf.TextWriterFormat<'T> -> 'T
Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.printfn
Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.printfn