Added option to specify custom validation messages