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

Clarify effective validation attributes #32639

Open
guardrex opened this issue May 23, 2024 · 0 comments
Open

Clarify effective validation attributes #32639

guardrex opened this issue May 23, 2024 · 0 comments

Comments

@guardrex
Copy link
Collaborator

Description

We don't have a list, and telling readers to just look at the DA API (<xref:System.ComponentModel.DataAnnotations?displayProperty=fullName>) isn't sufficient to identify:

  • The ones that only pertain to validation.
  • The ones that will work with the DA Validator in Blazor.
  • The ones that will work with a little extra code applied for client-side validation and perhaps an example implementation of that code (e.g., [CreditCard] might be the only one if the MVC validation article is correct).

I think we'll need to provide a list of the effective attributes for the article.

We already mention custom data annotation validation attributes and cross-link to the MVC article on that. However, I really have no idea on the gotchas 😈 and dragons 🐉 of trying to follow that guidance in a Blazor app with an EditForm and DataAnnotationsValidator. Maybe it works, or maybe it 💥 in your face 😨.

Page URL

https://learn.microsoft.com/en-us/aspnet/core/blazor/forms/validation?view=aspnetcore-8.0

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/forms/validation.md

Document ID

bcb470e1-c859-0549-b4ef-c6c9b7ef2c72

Article author

@guardrex

@guardrex guardrex added Source - Docs.ms Docs Customer feedback via GitHub Issue ⌚ Not Triaged labels May 23, 2024
@guardrex guardrex added Pri2 Priority 2 doc-enhancement and removed Source - Docs.ms Docs Customer feedback via GitHub Issue labels May 23, 2024
@dotnet dotnet deleted a comment from github-actions bot May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: P2 - Medium Priority
Development

No branches or pull requests

2 participants