Quintiq file version 2.0
#parent: #root
Method PTF_ValidateInteger (
  String action,
  String value,
  Number parameternr
) as String id:Method_LibPTF_dlgCreateEditTestScript_PTF_ValidateInteger
{
  #keys: '[103546.0.109833596]'
  Body:
  [*
    // Validate the parameter - Integer
    errormsg := "";
    
    if( not value.Regex( "(^-[0-9]+$)|(^[0-9]*$)" ) )
    {
      errormsg := 'Parameter #' + [String]parameternr + ' for action "' + action + '" should be an integer. Found '
                  + value + ' instead.' + String::NewLine();
    }
    
    return errormsg;
  *]
}
