mirror of
https://github.com/Xevion/rdap.git
synced 2025-12-06 15:16:07 -06:00
Fix query detection for Autnum
This commit is contained in:
@@ -759,7 +759,7 @@ export function createRDAPLink(url, title) {
|
|||||||
|
|
||||||
// TODO: Provide full domain, TLD, Ipv4 & Ipv6 validators
|
// TODO: Provide full domain, TLD, Ipv4 & Ipv6 validators
|
||||||
const TypeValidators: Record<TargetType, (value: string) => boolean> = {
|
const TypeValidators: Record<TargetType, (value: string) => boolean> = {
|
||||||
autnum: (value) => /^\d+$/.test(value),
|
autnum: (value) => /^AS\d+$/.test(value),
|
||||||
ip4: (value) => /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/?\d*$/.test(value),
|
ip4: (value) => /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/?\d*$/.test(value),
|
||||||
ip6: (value) => /^[0-9a-f:]{2,}\/?\d*$/.test(value),
|
ip6: (value) => /^[0-9a-f:]{2,}\/?\d*$/.test(value),
|
||||||
url: (value) => /^https?:/.test(value),
|
url: (value) => /^https?:/.test(value),
|
||||||
|
|||||||
Reference in New Issue
Block a user