Added basic javascript validation.
Validate field only if they exist.
Merge pull request #2 from patrick91/add_basic_validation

Add basic validation