Given validation on a field such as the following:validates :entity_type, inclusion: { in: %w(1 2), message: "is invalid" }
The error messages that will be returned if the user enters nil for the field are
“can’t be blank”, ” is invalid”
How can this validation be changed so that only 'can't be blank' is returned if nil is the entered value for the field?
This is a case where we don't want nil to be a valid value, just to clean up the validation messaging.