Skip to content

CompareAttribute not working properly with bound properties on the Razor Page's PageModel #4895

@RKDMax

Description

@RKDMax

Is this a Bug or Feature request?:

Bug

Steps to reproduce (preferably a link to a GitHub repo with a repro project):

See This Repo to reproduce

Description of the problem:

When using a compare attribute on bound properties in the PageModel itself, the otherProperty parameter is not getting honoured and results in a "Could not find a property named <otherProperty>".

Version of Microsoft.AspNetCore.Mvc or Microsoft.AspNetCore.App or Microsoft.AspNetCore.All:

Microsoft.AspNetCore.App 2.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    DoneThis issue has been fixedarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesenhancementThis issue represents an ask for new feature or an enhancement to an existing one

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions