IntentArchitect / Support

A repository dedicated to handling issues and support queries
3 stars 0 forks source link

Intent.Application.FluentValidation - Add "Email" validation #72

Closed shainegordon closed 9 months ago

shainegordon commented 9 months ago

What problem are you trying to solve?

FluentValidation comes with a helpful validation method .Email(), similar to .NotEmpty()

Describe the solution you'd like

It would be great if the Service designer supported this, via another checkbox, like Not Empty, Custom, Must

shainegordon commented 9 months ago

TBF, this validation might be too specific, as it won't be used on 99% of fields.

Maybe this is best left to the developer?

JonathanLydall commented 9 months ago

Hi @shainegordon,

This was already on our backlog to be done soon, we'll absolutely add it as an option on the stereotype 🙂

I'll update this issue once a pre-release is available.

JonathanLydall commented 9 months ago

TBF, this validation might be too specific, as it won't be used on 99% of fields.

Maybe this is best left to the developer?

Just in regards to this question, in this case we already felt it was common enough to add it to the list, we will also configure it so it will only show if the field type is string.

JonathanLydall commented 9 months ago

Hi @shainegordon, this is now available in the following modules:

Please don't hesitate to reach out should you have any feedback or questions 🙂.

shainegordon commented 9 months ago

Hi @shainegordon, this is now available in the following modules:

  • Intent.Application.FluentValidation.Dtos 3.7.1-pre.2
  • Intent.Application.MediatR.FluentValidation 4.4.2-pre.2

Please don't hesitate to reach out should you have any feedback or questions 🙂.

Fantastic