]> git.openstreetmap.org Git - rails.git/commit
Move exim email checks into a DeliverableEmailValidator
authorAndy Allan <git@gravitystorm.co.uk>
Thu, 5 Nov 2026 09:57:53 +0000 (09:57 +0000)
committerAndy Allan <git@gravitystorm.co.uk>
Thu, 5 Nov 2026 10:35:58 +0000 (10:35 +0000)
commit4c24f723c6cec622ca7c8a8971cccf755239da1b
tree1192adc4dfaf2cb649e75ea89c328aca5928cb0d
parent256f1a3557e24abec1a66280167c164ddf08baba
Move exim email checks into a DeliverableEmailValidator

The exim local part restrictions aren't really character validation, so
move them out of CharactersValidator into a dedicated email validator.
This runs the validates_email_format_of RFC checks first, and only applies
the exim restrictions to addresses that pass them, so users see a single
relevant error message.
app/models/user.rb
app/validators/characters_validator.rb
app/validators/deliverable_email_validator.rb [new file with mode: 0644]
test/validators/characters_validator_test.rb
test/validators/deliverable_email_validator_test.rb [new file with mode: 0644]