diff --git a/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBox.cs b/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBox.cs index 8d2b5b993..cf626bdac 100644 --- a/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBox.cs +++ b/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBox.cs @@ -196,7 +196,7 @@ public bool VerifyData() isError = Validation.GetHasError(this); if (isError) { - SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent); + SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent?.ToString()); } else { diff --git a/src/Shared/HandyControl_Shared/Controls/Input/ComboBox.cs b/src/Shared/HandyControl_Shared/Controls/Input/ComboBox.cs index d178848c8..94c838ef9 100644 --- a/src/Shared/HandyControl_Shared/Controls/Input/ComboBox.cs +++ b/src/Shared/HandyControl_Shared/Controls/Input/ComboBox.cs @@ -368,7 +368,7 @@ public virtual bool VerifyData() isError = Validation.GetHasError(this); if (isError) { - SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent); + SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent?.ToString()); } else { diff --git a/src/Shared/HandyControl_Shared/Controls/Input/DatePicker.cs b/src/Shared/HandyControl_Shared/Controls/Input/DatePicker.cs index 66fe911ee..515d62d99 100644 --- a/src/Shared/HandyControl_Shared/Controls/Input/DatePicker.cs +++ b/src/Shared/HandyControl_Shared/Controls/Input/DatePicker.cs @@ -164,7 +164,7 @@ public virtual bool VerifyData() isError = Validation.GetHasError(this); if (isError) { - SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent); + SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent?.ToString()); } else { diff --git a/src/Shared/HandyControl_Shared/Controls/Input/DateTimePicker.cs b/src/Shared/HandyControl_Shared/Controls/Input/DateTimePicker.cs index db1543c36..b694bbb7d 100644 --- a/src/Shared/HandyControl_Shared/Controls/Input/DateTimePicker.cs +++ b/src/Shared/HandyControl_Shared/Controls/Input/DateTimePicker.cs @@ -447,7 +447,7 @@ public virtual bool VerifyData() isError = Validation.GetHasError(this); if (isError) { - SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent); + SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent?.ToString()); } else { diff --git a/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs b/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs index ab2247d82..a1d209270 100644 --- a/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs +++ b/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs @@ -128,7 +128,7 @@ private void UpdateData() if (Validation.GetHasError(this)) { - SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent); + SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent?.ToString()); SetCurrentValue(IsErrorProperty, ValueBoxes.TrueBox); } } diff --git a/src/Shared/HandyControl_Shared/Controls/Input/PasswordBox.cs b/src/Shared/HandyControl_Shared/Controls/Input/PasswordBox.cs index 49e0d64da..7f85902cc 100644 --- a/src/Shared/HandyControl_Shared/Controls/Input/PasswordBox.cs +++ b/src/Shared/HandyControl_Shared/Controls/Input/PasswordBox.cs @@ -269,7 +269,7 @@ public virtual bool VerifyData() isError = Validation.GetHasError(this); if (isError) { - SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent); + SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent?.ToString()); } else { diff --git a/src/Shared/HandyControl_Shared/Controls/Input/TextBox.cs b/src/Shared/HandyControl_Shared/Controls/Input/TextBox.cs index 6cf338eb6..ba7a2e9a1 100644 --- a/src/Shared/HandyControl_Shared/Controls/Input/TextBox.cs +++ b/src/Shared/HandyControl_Shared/Controls/Input/TextBox.cs @@ -123,7 +123,7 @@ public virtual bool VerifyData() isError = Validation.GetHasError(this); if (isError) { - SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent); + SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent?.ToString()); } else { diff --git a/src/Shared/HandyControl_Shared/Controls/Input/TimePicker.cs b/src/Shared/HandyControl_Shared/Controls/Input/TimePicker.cs index 2a39fe1de..921f7f546 100644 --- a/src/Shared/HandyControl_Shared/Controls/Input/TimePicker.cs +++ b/src/Shared/HandyControl_Shared/Controls/Input/TimePicker.cs @@ -406,7 +406,7 @@ public virtual bool VerifyData() isError = Validation.GetHasError(this); if (isError) { - SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent); + SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent?.ToString()); } else {