Validate function added for select tag