 | ViewModel.IsValueValid<TValue> Method |
Can be used to check whether a value is valid.
Namespace:
BionicCode.Utilities.Net.Standard.ViewModel
Assembly:
BionicCode.Utilities.Net.Standard (in BionicCode.Utilities.Net.Standard.dll) Version: 1.0.4
SyntaxProtected Overridable Function IsValueValid(Of TValue) (
value As TValue,
validationDelegate As Func(Of TValue, (IsValid As Boolean, ErrorMessages As IEnumerable(Of String))),
Optional propertyName As String = Nothing
) As Boolean
Dim value As TValue
Dim validationDelegate As Func(Of TValue, (IsValid As Boolean, ErrorMessages As IEnumerable(Of String)))
Dim propertyName As String
Dim returnValue As Boolean
returnValue = Me.IsValueValid(value,
validationDelegate, propertyName)
J# supports the use of generic APIs, but not the declaration of new ones.
JScript does not support generic types or methods.
JavaScript does not support generic types or methods.
Parameters
- value
- Type: TValue
The value to check. - validationDelegate
- Type: System.Func<TValue, ValueTuple<Boolean, IEnumerable<String>>>
The validation delegate Func<T, TResult> which is invoked on the value. - propertyName (Optional)
- Type: System.String
The name of the property to set. Default name is the property that called this method.
Type Parameters
- TValue
- Generic type parameter of the value to check.
Return Value
Type:
Booleantrue when the value is valid, otherwise
false.
See Also