Validation working with the modal