OrchardCore icon indicating copy to clipboard operation
OrchardCore copied to clipboard

More Form Field validation in Workflows (regex)

Open MikeKry opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe.

Currently form field validation in workflows support only checking for required fields. It would be great to have more types of validation.

Describe the solution you'd like

Validation of form field with regex would cover most cases of server validation.

Describe alternatives you've considered

Creating custom validation tasks for each type of server validation, but that takes a lot of time.

MikeKry avatar Oct 14 '22 10:10 MikeKry

Just something like this image

in here or new activity https://github.com/OrchardCMS/OrchardCore/blob/339d74b251b53393dd510f8ad3027aa17d78500d/src/OrchardCore.Modules/OrchardCore.Forms/Workflows/Activities/ValidateFormFieldTask.cs

But I don't know what is the plan with worklfow validations, as here https://docs.orchardcore.net/en/dev/docs/reference/modules/Forms/ is mentioned that it will be validated against form widget settings.

MikeKry avatar Oct 14 '22 12:10 MikeKry

Introducing more validators is something we need to add, RegEx could be one of them, IMHO we could subclass the ValidteFormFieldTask to implement additional validators

hishamco avatar Oct 15 '22 08:10 hishamco