3be53f6db5
* fighting migrations * test automation type * fix type in tests and add test * split `storeAutomation` and `storeAutomationToken` * add `createTestAutomation` * fix test usage of `storeAutomation` * do not trigger functions if automation is a test automation * whoops * create test automations, almost * encryption keys on autoamation revisions are NOT optional * function selection in create test automation step * update tests, lint * Align input stylings Also update the general select input component so the placeholder text aligns with other inputs * Explain test automation and tweak copy * Update form components on parameters step To align with the form component updates I made in previous commits in this branch * create dialog enhancements * test automation badges --------- Co-authored-by: Benjamin Ottensten <benjamin.ottensten@gmail.com>
11 lines
385 B
TypeScript
11 lines
385 B
TypeScript
import { AutomationCreationError } from '@/modules/automate/errors/management'
|
|
|
|
export const validateAutomationName = (automationName: string): void => {
|
|
const nameLength = automationName?.length || 0
|
|
if (nameLength < 1 || nameLength > 255) {
|
|
throw new AutomationCreationError(
|
|
'Automation name should be a string between the length of 1 and 255 characters.'
|
|
)
|
|
}
|
|
}
|