Added validation for form submit. Had to rewrite the events to use a generic doValidate event which will be trigger by other events as registered in the data-validator-trigger attribute. This however led to some undesirable code which will have to be rewritten in the near future.