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

Mistake in Create.cshtml #2

Open
jaszczykj opened this issue Jun 25, 2019 · 0 comments
Open

Mistake in Create.cshtml #2

jaszczykj opened this issue Jun 25, 2019 · 0 comments

Comments

@jaszczykj
Copy link

You have

@Html.EditorFor(model => model.CustomerName, new { htmlAttributes = new { @class = "form-control", @autofocus = "autofocus" } })
@Html.ValidationMessageFor(model => model.CustomerId, "", new { @class = "text-danger" })

but it shoul be

@Html.EditorFor(model => model.CustomerName, new { htmlAttributes = new { @class = "form-control", @autofocus = "autofocus" } })
@Html.ValidationMessageFor(model => model.CustomerName, "", new { @class = "text-danger" })

change
model => model.CustomerId
to
model => model.CustomerName
in CustomerName field

Without this change you don't see error message when you leave empty filed: CustomerName

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

No branches or pull requests

1 participant