forked from marva/sumorobot-web
Can use any id Sumo-xxxxxx or xxxxxx case insensitive also
This commit is contained in:
@@ -231,7 +231,7 @@ window.addEventListener('load', function() {
|
||||
// Robot GO button listener
|
||||
$('.btn-robot-go').click(function() {
|
||||
// Get and validate the selected robot ID
|
||||
var robotId = $('#robot-id').val().trim();
|
||||
var robotId = $('#robot-id').val().trim().toLowerCase().split("-").reverse()[0];
|
||||
if (robotId === '' || /^([a-zA-Z0-9]{6})$/.test(robotId) == false) {
|
||||
$('#robot-id, #robot-label').addClass('has-error');
|
||||
return;
|
||||
|
Reference in New Issue
Block a user