mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-10 05:26:50 +03:00
12 lines
280 B
TypeScript
12 lines
280 B
TypeScript
import { ValidationResult } from './types';
|
|
|
|
export function validateOutboundJson(value: string): ValidationResult {
|
|
try {
|
|
JSON.parse(value);
|
|
|
|
return { valid: true, message: _('Valid') };
|
|
} catch {
|
|
return { valid: false, message: _('Invalid JSON format') };
|
|
}
|
|
}
|