Add class validator to your project
Install Class Validator Packages
class-validator-jsonschema package to generate JSON schemas from your DTOs. You may also need the reflect-metadata package.Controls and Payload UI
When you define acontrolSchema for a step, Novu will automatically generate a UI for the controls in the workflow editor.
- Form Input Title - Will be derived from the key of the Class Validator schema. Unfortunately Class Validator does not support custom titles at this point.
- Form Input Type - Will be derived from the Class Validator schema type, with support for
string,number,boolean, andenumandarraytypes. - Default Value - Unfortunately Class Validator does not support default values at this point.
- Validation - Will be derived from the Class Validator schema validation decorators, including
@Min,@Max,@IsEmail,@IsUrland etc…