Added validate function to modal