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

Avoid auto-generating ObservableValidator.HasError #884

Merged
merged 1 commit into from
Aug 9, 2024
Merged

Avoid auto-generating ObservableValidator.HasError #884

merged 1 commit into from
Aug 9, 2024

Conversation

arivoir
Copy link

@arivoir arivoir commented May 31, 2024

Closes #881

The change adds the System.ComponentModel.DisplayAttribute to the property HasErrors of ObservableValidator class.

The property AutGenerateField of the Display attribute will be set to false. This way when objects having validation are bound to any UI control supporting DataAnnotations will not generate any UI for this property.

@arivoir
Copy link
Author

arivoir commented Jun 3, 2024

@dotnet-policy-service agree

@QJS-RH
Copy link

QJS-RH commented Jun 3, 2024 via email

@arivoir arivoir changed the title fix #881 Avoid auto-generating ObservableValidator.HasError Jun 4, 2024
Copy link
Member

@Sergio0694 Sergio0694 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! 🙂

@Sergio0694 Sergio0694 merged commit a4d239e into CommunityToolkit:main Aug 9, 2024
4 checks passed
@arivoir arivoir deleted the feature/881 branch August 9, 2024 01:55
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

Successfully merging this pull request may close these issues.

Property HasErrors of ObservableValidator is auto-generated in controls with auto-generation
3 participants