Volt - Add User Sample Project


#1

WHen I go to test this app on the Volt server ,it doesn’t do anything. No error message and no added user.
Does this sample app still work?
I’m trying to understand the user/volt/application process.


#2

Good find - there was a missing statement in the CheckPassword function. It was not returning the value properly.

This is fixed in the next build.

BASIC

Function CheckPassword(inputtxt) {
  var ok = false;
  var decimal=  /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,15}$/; 
  ok = (inputtxt.value.match(decimal) != null)
  if (inputtxt.value.length>19) ok = true;
  if (ok) {
    Alert1.hide();
  } else {
    Alert1.show();
  }
  return ok
}

JavaScript

function CheckPassword(inputtxt) {
  var ok = false;
  var decimal=  /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,15}$/; 
  ok = (inputtxt.value.match(decimal) != null)
  if (inputtxt.value.length>19) ok = true;
  if (ok) {
    Alert1.hide();
  } else {
    Alert1.show();
  }
  return ok
}

#3

Awesome, this works good. It’s actually done with a JavaScript block in the basic code. When I tried the basic one, it had a syntax error.