Validator -- Convert Arrow Function to Normal Function
Summary
Validator For Numbers or anything elseContent
Hello,
This question is based on Shay's original post at: https://cloudcustomerconnect.oracle.com/posts/3a15dbfbe8
Does anyone know how to convert this arrow function to normal javascript? I've tried but the way we need to call it in VBCS is confusing me.
PageModule.prototype.numericValidator = function(newValue) {
    return [{
      validate: (newValue) => {
        if (isNaN(newValue)) {
            throw new Error('Must be a number');
          }
          return true;
        }
    }];
  };
Thanks,
Steve
Version
19.1.3
            Tagged:
            
        
0