Jump to content

Custom Domain Validation Checking


Recommended Posts

Hello 
I am creating a custom registrar module, and I want to add validation for domain names that should be invalid when using special characters like %tesdomain&.xyz. This work for the following examples:

  • -tesdomain.xyz
  • tesdomain-.xyz
  • -tesdomain-.xyz
  • na--domain.my.id

    All the example above should return an error "the domain is invalid".

I have tried using the DomainValidation hook, but it seems the domain name is already sanitized from special characters, so I think I cannot use this method. Do you have any ideas on how to perform this validation?
now i am using whmcs namespinning
 as the lookup provider

Screenshot from 2024-07-23 16-29-37.png

Link to comment
Share on other sites

Quote

Why not query the registry's WHOIS? It seems you'd need to get the availability value...

No, I don't have any issues with getting the availability value. I just want to add additional validation outside of the validation done by WHMCS. For example, when I enter a domain name like $tesdomain%, it gets detected as 'tesdomain' and it's considered available (if available). What I mean is that I want to add validation for domains that contain special characters.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated