JavascriptToolbox.com Now Available!

Almost all of my javascript code has been moved over to its new home at The Javascript Toolbox. Please go there to find the latest scripts, information, etc. These pages will remain here for a while for historical purposes in case anyone needs a production copy of old code.
Validations
[Toolbox]  [Example]  [Source]
Description:
These are reusable functions for common validations.

It includes things like checking if a value is a number, integer, blank, etc.

It also has generic routines for getting and setting the value of any type of input field, as well as checking if the value has changed.

Example:

Function Description Test
isBlank True if the value is whitespace, newlines, or tabs. Otherwise false.
isInteger True if the value is an integer, otherwise false.
isNumeric True if the value is any valid numerical value (1.4, -4.56, etc), otherwise false.
isDigit True if the value is a single character 0-9
setNullIfBlank Sets an input field's value to empty if it only contains whitespace, newlines, or tabs
setFieldsToUpperCase Sets values of input fields to their uppercase values.
disallowBlank Returns true if field is blank, alerts a message, and focuses cursor to field requiring an input. Otherwise returns false.
disallowModify Returns true if field has been modified, alerts a message, and focuses cursor to field that was changed. Otherwise returns false.
getInputValue Returns the value of any input element, regardless of type. Returns a comma-separated list for multiple selects and multiple form fields with the same name.
a:
b:
c: (hidden)
d:
e:
f: 1. 2.
g:
h: 1. 2. 3.
setInputValue Sets the value of any input element, regardless of type.
Value to set:
a:
b:
c: (hidden)
d:
e:
f: 1. 2.
g:
h: 1. 2. 3.
getInputDefaultValue Returns the default value (at page load time) of any input element, regardless of type. Returns a comma-separated list for multiple selects and multiple form fields with the same name.
a:
b:
c: (hidden)
d:
e:
f: 1. 2.
g:
h: 1. 2. 3.
isChanged Returns true if the current value of a form field does not equal the value when the page was loaded.
a:
b:
c: (hidden)
d:
e:
f: 1. 2.
g:
h: 1. 2. 3.