refactor form validation to only load on required pages using shared view