Commit graph

5 commits

Author SHA1 Message Date
yheuhtozr
adc757f5a5
app/validators i18n (#16166) 2022-01-19 05:25:39 -05:00
Jeremy Friesen
9687760056
Updating valid domain registration (#15436)
* Updating valid domain registration

Prior to this commit, our regular expression did not account for the `-`
character as valid within the domain.  The `-` character cannot be the
first nor last character of the domain (e.g. `-hello.com` nor
`hello-.com` are invalid but `hell-o.com` is valid).

In addition I tidied up the default value of the
`blocked_registration_email_domains` to match it's sibling `allowed_registration_email_domains`.

This relates to the spammer seo-hunt.com

* Adding validator domain validator spec

* Moving request spec to unit spec

This change does two things:

1) Allows for 2 character domains
2) Moves the spec for 2 character domains from an expensive spec to a
   cheaper to run spec (e.g., request-cycle to unit-test validator)

It preserves PR #12268
2021-11-19 10:05:00 -05:00
Michael Kohl
c16ec1d53d
Remove redundant freeze calls (#14596) 2021-08-26 10:01:08 -04:00
Mac Siri
b06b446176
Allow setting nil value in Settings::Upsert (#14228) 2021-07-20 10:57:09 -04:00
Michael Kohl
b4a480edae
Add validations to SiteConfig model (#12341)
* Move straightforward validations

* Add color contrast validation to SiteConfig

* Move domain and emoji validation to SiteConfig

* Add specs

* Update service object

* Experimentally remove validation

* Update spec

* Fix comment
2021-01-26 09:12:24 +07:00