{
  "name": "thai_baht_text",
  "slug": null,
  "description": {
    "th": "แปลงจำนวนเงินบาทเป็นคำอ่านภาษาไทยแบบ BAHTTEXT เช่น 1250.50 → หนึ่งพันสองร้อยห้าสิบบาทห้าสิบสตางค์ ใช้เมื่อต้องเขียนจำนวนเงินตัวอักษรในใบเสร็จ ใบแจ้งหนี้ เช็ค หรือสัญญา",
    "en": "Converts a baht amount to Thai words like Excel BAHTTEXT, e.g. 1250.50 → หนึ่งพันสองร้อยห้าสิบบาทห้าสิบสตางค์. Use when a receipt, invoice, cheque or contract needs the amount written in Thai words."
  },
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "amount": {
        "description": "Amount in baht, at most 2 decimals, 0 to 999,999,999,999.99.",
        "anyOf": [
          {
            "type": "number",
            "minimum": 0,
            "maximum": 999999999999.99
          },
          {
            "type": "string",
            "pattern": "^\\s*(฿\\s*)?(\\d+|\\d{1,3}(,\\d{3})+)(\\.\\d{1,2})?\\s*$"
          }
        ]
      }
    },
    "required": [
      "amount"
    ],
    "additionalProperties": false
  }
}
