Fixing an issue where any string will pass validation as a number.

The validate method in base.js was not consistently adding an error to the errors array when the validation failed.  This had the effect of allowing an object to pass schema validation when it shouldn't, such as a property with the value of 'a' validating as a number.