Added generic validation code and styles. Working on making it use a directive.