Commit 02fbdab7 by Sheng

Check form data required before submission

parent 23f48e21
......@@ -11,6 +11,11 @@ jQuery(function($){
type = form.attr('type'),
data = new FormData(this);
if (!data.get('hostname') || !data.get('port') || !data.get('username')) {
status.text('Hostname, port and username are required.');
return;
}
var pk = data.get('privatekey');
if (pk && pk.size > 16384) {
status.text('Key size exceeds maximum value.');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment