Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve domain name validation #233

Merged
merged 1 commit into from
Feb 19, 2023
Merged

Conversation

Genne23v
Copy link
Contributor

@Genne23v Genne23v commented Feb 16, 2023

Resolve #185

Adding domain name validation as following rules

  • Domain name pattern should be [name].[studentId].rootDomain.com(.)
  • Domain name can contain only alphanumerical characters, -, and _
  • Domain name should not start or end with -
  • Domain name cannot contain multiple consecutive - or _
  • Domain name can contain uppercase in UI but it is converted to lowercase before validation
  • studentId only contains alphanumerical characters

Also domain name is lowercased before adding it to Route 53, but original name is stored in DB

@Genne23v Genne23v self-assigned this Feb 16, 2023
@Genne23v Genne23v added this to the Milestone 0.3 milestone Feb 16, 2023
@Genne23v Genne23v requested a review from humphd February 16, 2023 02:02
@Genne23v Genne23v added category: DNS A service about hosting domains category: data Anything related to data management and structure labels Feb 16, 2023
app/lib/dns.server.ts Outdated Show resolved Hide resolved
app/lib/dns.server.ts Outdated Show resolved Hide resolved
app/lib/domains.server.ts Outdated Show resolved Hide resolved
@Genne23v Genne23v requested a review from a user February 18, 2023 01:53
humphd
humphd previously approved these changes Feb 18, 2023
package.json Show resolved Hide resolved
app/lib/dns.server.ts Outdated Show resolved Hide resolved
app/lib/dns.server.ts Outdated Show resolved Hide resolved
app/lib/dns.server.ts Outdated Show resolved Hide resolved
app/lib/dns.server.ts Outdated Show resolved Hide resolved
app/lib/dns.server.ts Show resolved Hide resolved
@Genne23v Genne23v merged commit 693dee2 into DevelopingSpace:main Feb 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: data Anything related to data management and structure category: DNS A service about hosting domains
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve regex for domain name validation
3 participants