updated changeset

Signed-off-by: Alex Rybchenko <arybchenko@box.com>
This commit is contained in:
Alex Rybchenko
2022-12-13 18:05:44 +01:00
parent 9000952e87
commit 6b261d9b29
+12 -2
View File
@@ -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
};
```