2019-02-23 00:22:01 +08:00
|
|
|
function validateForm(form) {
|
2017-05-19 02:07:56 +08:00
|
|
|
var errors = new Array();
|
|
|
|
if ( !form.elements['newServer[Name]'].value ) {
|
2019-02-23 00:22:01 +08:00
|
|
|
errors[errors.length] = 'You must supply a name';
|
2017-05-19 02:07:56 +08:00
|
|
|
}
|
|
|
|
if ( errors.length ) {
|
2019-02-23 00:22:01 +08:00
|
|
|
alert(errors.join("\n"));
|
|
|
|
return false;
|
2017-05-19 02:07:56 +08:00
|
|
|
}
|
2019-02-23 00:22:01 +08:00
|
|
|
return true;
|
2015-09-16 21:12:21 +08:00
|
|
|
}
|