I am using RequiredIf attribute: https://www.c-sharpcorner.com/article/dotvvm-build-conditional-validation-attribute/
It works as expected when creating a new record. However, when editing an existing record, ModelState.IsValid is set to false if two fields that are required if a certain project type drop-down value is selected are null.
Because of this, two issues happen:
- Any child records that were previously displayed in their respective tables in the form are no longer displayed.
- The record number is displayed as zero. This is not the record Id.
When the record is saved, the child records and the correct record number (not zero) are displayed in the details page.
