Initial work of adding validation function to form-template