Skip to content

Commit b789663

Browse files
Add explanatory comment for accounts_host_format regex
1 parent fce88d3 commit b789663

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/school_email_domain_validator.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ def self.validate_domain(domain)
5050
end
5151

5252
def self.validate_host(host)
53+
# School email domains are sent to Profile, which validates them using a "fully qualified domain name" regex
54+
# Any changes to accounts_host_format must align with the pattern that Profile applies in its app/lib/fqdn.js
5355
accounts_host_format =
5456
/\A\s*(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\.)+[A-Za-z]{2,63}\s*\z/i
5557

0 commit comments

Comments
 (0)