validate_integer field_name stringWhat it does:
Throws an error if the string isn't a decimal integer; otherwise strips any leading zeros (so this won't work for octals) and returns the result.Defined in: /web/philip/packages/acs-core/utilities-procs.tcl
Source code:
if { ![regexp {^[0-9]+$} $string] } {
error "The entry for $field_name, \"$string\" is not an integer"
}
# trim leading zeros, so as not to confuse Tcl
set string [string trimleft $string "0"]
if { [empty_string_p $string] } {
# but not all of the zeros
return "0"
}
return $string