Click or drag to resize

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
Syntax
protected virtual bool IsValueValid<TValue>(
	TValue value,
	Func<TValue, (bool IsValid, IEnumerable<string> ErrorMessages)> validationDelegate,
	string propertyName = null
)

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: Boolean
true when the value is valid, otherwise false.
See Also
https://github.com/BionicCode/BionicCode.Net/blob/master/README.md