zoneminder/web/skins/classic/views/js/server.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
252 B
JavaScript
Raw Normal View History

function validateForm(form) {
var errors = [];
2017-05-19 02:07:56 +08:00
if ( !form.elements['newServer[Name]'].value ) {
errors[errors.length] = 'You must supply a name';
2017-05-19 02:07:56 +08:00
}
if ( errors.length ) {
alert(errors.join("\n"));
return false;
2017-05-19 02:07:56 +08:00
}
return true;
}