InternetCompetition/src/validate.js

8 lines
317 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 辅助函数检查主DNS服务器地址是否有效
export let isValidPrimaryDNS = (value) => {
// 在这里可以添加更多的校验逻辑
// 例如检查是否是有效的IP地址或域名
// 这里只提供了一个简单的示例
return /\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/.test(value);
};