(name: string)
| 53 | }; |
| 54 | |
| 55 | export const validatePropertyName = (name: string) => { |
| 56 | const ALLOWED_PROPERTY_NAME_CHARACTERS = /^[a-zA-Z0-9_]+$/; |
| 57 | if (!ALLOWED_PROPERTY_NAME_CHARACTERS.test(name)) { |
| 58 | throw new AgentRPCError( |
| 59 | `Property name must only contain letters, numbers and underscore '_'. Got: ${name}`, |
| 60 | ); |
| 61 | } |
| 62 | }; |
| 63 | |
| 64 | export const validateDescription = (description?: string) => { |
| 65 | if (description === "") { |