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

Missing input validation in Elsa Workflow Editor for inherited CodeActivity<T> classes. #306

Open
anupam-mangal opened this issue Oct 15, 2024 · 0 comments

Comments

@anupam-mangal
Copy link

anupam-mangal commented Oct 15, 2024

When I define a new activity like the example below, all fields rendered by the Elsa workflow editor are always of type string.

public class CustomActivity : CodeActivity<SampleDTO>
{
  [Input(Description = "Field description")]
  [Range(0, int.MaxValue)]
  public Input<int> Order { get; set; } = default!;

  [Input(Description = "Field description")]
  public Input<string> CustomString { get; set; } = default!;
}

When the above class is used in Elsa Wokflow editor, both the fields are displayed of type 'string'.

I believe Elsa Editor knows the data types of each field it is rendering but somehow it does not use that information to create numeric fields for numeric data types (input validation). Without this feature, users can enter any alphabetic or alphanumeric string for integer or other numeric fields while creating/editing a workflow definition. Further, I do not see any hook or annotation or any way to add custom input validation rules to custom activity fields.

Please consider fixing this issue for the benefit of Elsa users. I am using Elsa 3.2.0.

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

No branches or pull requests

1 participant