Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Add tests for [BindingBehavior] applied to page model properties #7353

@dougbu

Description

@dougbu

Found while verifying #6811.

Though IsBindingAllowed and IsBindingRequired are likely now set correctly in ModelMetadata -- as part of the #6790 fixes, [BindRequired], [BindNever] and so on do not impact model binding of page model properties.

For example

[BindProperty(SupportsGet = false)]
[BindRequired]
public string Required { get; set; }

works as expected if the Required property is in a controller. But no model error occurs when the same property is in page model. (In both cases, the form does not include an <input/> field for Required.)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions