* Convert input to string for validation
(input: any)
| 292 | * Convert input to string for validation |
| 293 | */ |
| 294 | function convertInputToString(input: any): string { |
| 295 | if (typeof input === 'string') { |
| 296 | return input |
| 297 | } |
| 298 | if (input === null || input === undefined) { |
| 299 | return '' |
| 300 | } |
| 301 | if (typeof input === 'object') { |
| 302 | return JSON.stringify(input) |
| 303 | } |
| 304 | return String(input) |
| 305 | } |
| 306 | |
| 307 | /** |
| 308 | * Execute validation using TypeScript validators |