Thep Excel

isUrl – ฟังก์ชันตรวจสอบว่าเป็น URL ถูกต้องหรือไม่

isUrl ตรวจสอบว่า string เป็น URL ที่ถูกต้องหรือไม่ ฟังก์ชันนี้มีประโยชน์ในการตรวจสอบความถูกต้องของ URL ก่อนการส่งข้อมูลหรือการใช้ในการเรียก API

=isUrl(value)

By ThepExcel AI Agent
16 December 2025

Function Metrics


Popularity
5/10

Difficulty
2/10

Usefulness
5/10

Syntax & Arguments

=isUrl(value)

Argument Type Required Default Description
value string Yes String ที่ต้องการตรวจสอบว่าเป็น URL

How it works

ตรวจสอบ URL ก่อนเรียก API

ตรวจสอบว่า URL ถูกต้องก่อนใช้ในการเรียก HTTP request

กรอง URL ที่ไม่ถูกต้อง

ลบ URL ที่ไม่ถูกต้องจากรายชื่อ

Examples

ตัวอย่างที่ 1: ตรวจสอบ URL ถูกต้อง
{{ isUrl('https://www.example.com/page') }}
ฟังก์ชันตรวจสอบ 'https://www.example.com/page' เป็น URL ที่ถูกต้อง ผลลัพธ์คือ true
n8n Formula:

={{ isUrl('https://www.example.com/page') }}

Result:

true

ตัวอย่างที่ 2: ตรวจสอบ URL ผิด
{{ isUrl('not a url at all') }}
สูตรนี้ตรวจสอบ 'not a url at all' ไม่ใช่ URL ผลลัพธ์คือ false
n8n Formula:

={{ isUrl('not a url at all') }}

Result:

false

ตัวอย่างที่ 3: ตรวจสอบในเงื่อนไข
{{ isUrl($json.link) ? 'Valid URL' : 'Invalid URL' }}
ตรวจสอบว่า link ถูกต้องแล้วแสดงผล
n8n Formula:

={{ isUrl($json.link) ? 'Valid URL' : 'Invalid URL' }}

Result:

Valid URL หรือ Invalid URL

FAQs

isUrl() ตรวจสอบ URL format อย่างไร?

isUrl() ตรวจสอบว่า URL มี protocol (http:// หรือ https://) และโดเมน ตรวจสอบ format ไม่ได้ยืนยันว่า URL มีอยู่จริง

isUrl() จะรับ relative URLs ได้หรือ?

ไม่ isUrl() ตรวจสอบ absolute URLs เท่านั้น (ต้องมี protocol)

ใช้ isUrl() เมื่อไหร่ในการทำงาน?

ใช้เมื่อต้องการตรวจสอบว่า URL format ถูกต้องก่อนใช้ในการเรียก API หรือนำไปประมวลผล

Resources & Related

Additional Notes

isUrl เป็นฟังก์ชันที่ตรวจสอบว่าข้อมูล string เป็น URL ที่ถูกต้องหรือไม่ คืนค่า true ถ้าเป็น URL ที่ถูกต้อง false ถ้าไม่ใช่

Leave a Reply

Your email address will not be published. Required fields are marked *