diff --git a/.changeset/nasty-dragons-melt.md b/.changeset/nasty-dragons-melt.md index b083ebce62..2f6610ff31 100644 --- a/.changeset/nasty-dragons-melt.md +++ b/.changeset/nasty-dragons-melt.md @@ -1,5 +1,15 @@ --- -'@backstage/plugin-scaffolder': minor +'@backstage/plugin-scaffolder': patch --- -All form data is now passed to validator functions in 'next' scaffolder, so it's now possible to perform validation for fields that depend on other field values +Form data is now passed to validator functions in 'next' scaffolder, so it's now possible to perform validation for fields that depend on other field values. This is something that we discourage due to the coupling that it creates, but is sometimes still the most sensible solution. + +```typescript jsx +export const myCustomValidation = ( + value: string, + validation: FieldValidation, + { apiHolder, formData }: { apiHolder: ApiHolder; formData: JsonObject }, +) => { + // validate +}; +```