discourse/lib/validators
Sam Saffron 0a5a6dfded DEV: stop mutating inputs as a side effect
We had quite a few cases in core where inputs are being mutated as a side
effect of calling a method.

This handles all the cases where specs caught this.

Mutating inputs makes code harder to reason about. Eg:

```
frog = "frog"
jump(frog)
puts frog
"fly" # ?????
```

This commit is part of a followup commit that adds # frozen_string_literal
to all our specs.
2019-04-30 10:25:53 +10:00
..
allow_user_locale_enabled_validator.rb
allowed_ip_address_validator.rb
alternative_reply_by_email_addresses_validator.rb
category_search_priority_weights_validator.rb FEATURE: Allow categories to be prioritized/deprioritized in search. (#7209) 2019-03-25 10:59:55 +08:00
censored_words_validator.rb
color_list_validator.rb FEATURE: custom colors for default letter avatars (#7167) 2019-03-18 16:24:21 +01:00
email_setting_validator.rb
email_validator.rb
enable_invite_only_validator.rb FIX: Do not allow `invite_only` and `enable_sso` at the same time 2019-04-02 10:26:27 -04:00
enable_local_logins_via_email_validator.rb
enable_private_email_messages_validator.rb
enable_sso_validator.rb FIX: Do not allow `invite_only` and `enable_sso` at the same time 2019-04-02 10:26:27 -04:00
external_system_avatars_validator.rb FEATURE: Add support for Unicode usernames and group names 2019-04-23 13:00:27 +02:00
group_setting_validator.rb FEATURE: Add site contact group. (#7152) 2019-03-13 11:34:47 +01:00
integer_setting_validator.rb
ip_address_format_validator.rb
max_emojis_validator.rb
max_username_length_validator.rb
min_username_length_validator.rb
password_validator.rb
pop3_polling_enabled_setting_validator.rb
post_validator.rb FIX: use ordered_posts for last post check, not the posts relation 2019-01-18 13:18:40 +11:00
quality_title_validator.rb
regex_presence_validator.rb
regex_setting_validation.rb
regex_setting_validator.rb
reply_by_email_address_validator.rb DEV: stop mutating inputs as a side effect 2019-04-30 10:25:53 +10:00
reply_by_email_enabled_validator.rb
sso_overrides_email_validator.rb
string_setting_validator.rb
stripped_length_validator.rb
topic_title_length_validator.rb
unicode_username_validator.rb FEATURE: Add support for Unicode usernames and group names 2019-04-23 13:00:27 +02:00
unicode_username_whitelist_validator.rb FEATURE: Add support for Unicode usernames and group names 2019-04-23 13:00:27 +02:00
unique_among_validator.rb
upload_url_validator.rb
upload_validator.rb
url_validator.rb
user_full_name_validator.rb
username_setting_validator.rb