Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation not working (throws error 500) when data source for bs:FormControlComboBox contains value "null". #1745

Open
kostyio opened this issue Nov 27, 2023 · 0 comments

Comments

@kostyio
Copy link

kostyio commented Nov 27, 2023

Hello,

I am using bs:FormControlComboBox in a .dothtml page, where as a data source is used an ICollection filled with values from enum + value "null". In the view model is used a model which inherits "IValidatableObject" and has the Validate method implemented. If the validation of this object fails, the page throws error 500 (Unhandled exception), instead of highlighting the required field to the user. The bug "dissapears" (the validation works as it should and highlights the required fields) if the value "null" is removed from the data source of the bs:FormControlComboBox.

localhost_61076_1

Bug reproduction project : https://github.com/kostyio/NullablePropertyDotVVMValidatorBug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants