A Javascript Simple Validator