Client validation is not working for Title property of BlogPost (and other models) but OK for other properties (including other models)

11 months ago
1. Version: 4.2
2. Expected: When Title input is empty I expect to see 'Title Required' message without full page reload using jquery validate
3. Actual: Page refreshes without triggering jquery validation
4. Steps: go to Admin -> Content -> New Blog Post -> Leave Title empty -> Save

When replacing <nop-editor... with <input asp-for="Title" the validation is working as expected then.

It seems to be something is wrong with nop-editor tag helper. Also the issue can be reproduced for Title property only. For other properties validation is triggered OK.

The issue is that data-val-required="" attribute is not in the result markup when using <nop-editor> for some reason
11 months ago
Thanks, here is a work item for the further investigation of this issue.
11 months ago
The data-val-* attributes are not created in the process of markup generation if ViewBug and Model have the same property name (in our case, Title). Therefore, the edit was to rename the Title property to ViewBug.

Please see this commit.