Validates a parameter as a valid character representing a number. :param parameterValue: Value to be evaluated. :type Unknown :return Boolean: True indicates the parameter is a valid value. :type Boolean
(parameterValue)
| 287 | #Tested 13 |
| 288 | @staticmethod |
| 289 | def funcIsValidPositiveNumberChar(parameterValue): |
| 290 | """ |
| 291 | Validates a parameter as a valid character representing a number. |
| 292 | |
| 293 | :param parameterValue: Value to be evaluated. |
| 294 | :type Unknown |
| 295 | :return Boolean: True indicates the parameter is a valid value. |
| 296 | :type Boolean |
| 297 | """ |
| 298 | |
| 299 | #Check to make sure is a valid string |
| 300 | if not ValidateData.funcIsValidString(parameterValue): |
| 301 | return False |
| 302 | |
| 303 | #Try to convert to decimal |
| 304 | try: |
| 305 | decimalConversion = decimal.Decimal(parameterValue) |
| 306 | if decimalConversion < 0: |
| 307 | return False |
| 308 | except: |
| 309 | return False |
| 310 | return True |
| 311 | |
| 312 | #Tested 9 |
| 313 | @staticmethod |
nothing calls this directly
no test coverage detected