# Intent.Blazor.HttpClients.Dtos.DataAnnotations

This [Intent Architect](https://intentarchitect.com/) module adds attributes to properties of inbound DTOs/Commands generated by the [Intent.Blazor.HttpClients](../intent-blazor-httpclients/intent-blazor-httpclients.md) module.

For each property, it will add all the appropriate attributes that it can from the [System.ComponentModel.DataAnnotations](https://learn.microsoft.com/dotnet/api/system.componentmodel.dataannotations) namespace based on any [Validation Rules](https://docs.intentarchitect.com/docs-md/modules-dotnet/intent-application-fluentvalidation/intent-application-fluentvalidation.md) applied to the field in the Services designer as well as any [implicit/inferred validation rules](https://docs.intentarchitect.com/docs-md/modules-dotnet/intent-application-fluentvalidation/intent-application-fluentvalidation.md#implicitinferred-validation-rules) which may be applicable.

```diff
    public class AggregateRootDto
    {
        public Guid Id { get; set; }
+       [Required(ErrorMessage = "Aggregate attr is required.")]
        public string AggregateAttr { get; set; }
+       [Required(ErrorMessage = "Composites is required.")]
        public List<AggregateRootCompositeManyBDto> Composites { get; set; }
        public AggregateRootCompositeSingleADto? Composite { get; set; }
        public AggregateRootAggregateSingleCDto? Aggregate { get; set; }
+       [Required(ErrorMessage = "Enum type 1 is required.")]
        public EnumWithoutValues EnumType1 { get; set; }
+       [Required(ErrorMessage = "Enum type 2 is required.")]
        public EnumWithDefaultLiteral EnumType2 { get; set; }
+       [Required(ErrorMessage = "Enum type 3 is required.")]
        public EnumWithoutDefaultLiteral EnumType3 { get; set; }
    }
```
