Javascript form validation

- basic form validation with javascript.
- Adds a error: "error text" to field definitions.
  Displayed when a field does not validate.