testing script on various field types
Fixes + improvement

fixed a few script errors.
Script now returns an object for each validated element, containing the
following info:
result: true/false,
errorMsg: 'string',
node: reference to the DOM element