0
Good morning,
I am a beginner in Rails and I have the following problem:
I need to do a validation on my model where the content needs to be unique except when it is '000000'.
I’ve tried to use:
validates :registration, uniqueness: true, exclusion: {in: '000000'}
validates :registration, uniqueness: true, unless: {in: '000000'}
end
Someone could help me make this validation work?