Defining the custom validation