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