mirror of
https://github.com/huashengdun/webssh.git
synced 2026-08-20 04:36:42 +00:00
Check form data required before submission
This commit is contained in:
@@ -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.');
|
||||
|
||||
Reference in New Issue
Block a user