Skip to content
This repository was archived by the owner on Mar 23, 2023. It is now read-only.

Commit dc108b5

Browse files
One last update to reduce line length
1 parent 539a972 commit dc108b5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/validators/email_validator.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
class EmailValidator < ActiveModel::EachValidator
22
def validate_each(record, attribute, value)
3-
record.errors[attribute] << email_invalid_error_message unless email_valid?(value) && handle_contains_number_of_dots(value) && handle_last_character_is_not_dot(value)
3+
record.errors[attribute] << email_invalid_error_message unless email_valid?(value)\
4+
&& handle_contains_number_of_dots(value)\
5+
&& handle_last_character_is_not_dot(value)
46
end
57

68
private

0 commit comments

Comments
 (0)