|
@@ -158,6 +158,8 @@ img {
|
|
|
function formCheck()
|
|
|
{
|
|
|
var OcppServerURL = document.getElementById("OcppServerURL").value;
|
|
|
+ var ChargeBoxId = document.getElementById("ChargeBoxId").value;
|
|
|
+ var chargePointVendor = document.getElementById("chargePointVendor").value;
|
|
|
var tests=/^(ws|wss):\/\/((([0-9]{1,3}\.){3}[0-9]{1,3})|(([a-zA-Z0-9]+(([\-]?[a-zA-Z0-9]+)*\.)+)*[a-zA-Z]{2,}))+/;
|
|
|
if(OcppServerURL!=""){
|
|
|
if(OcppServerURL.match(tests)==null){
|
|
@@ -166,6 +168,20 @@ img {
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
+ if(ChargeBoxId!=""){
|
|
|
+ if(ChargeBoxId.length>25){
|
|
|
+ alert("Length of ChargeBoxId should be less than 25!");
|
|
|
+ document.getElementById("ChargeBoxId").focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(chargePointVendor!=""){
|
|
|
+ if(chargePointVendor.length>20){
|
|
|
+ alert("Length of chargePointVendor should be less than 20!");
|
|
|
+ document.getElementById("chargePointVendor").focus();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
return true;
|
|
|
}
|
|
|
|