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