blob: c18a9356e3eb89ea33a70159da87eb323495145a [file] [log] [blame]
import { Alert } from '../json';
/**
* validate returns the empty string if the Alert is valid, otherwise it
* returns a message explaining why the Alert is invalid.
*/
export function validate(alert: Alert): string {
if (!alert.query) {
return 'An alert must have a non-empty query.';
}
return '';
}