{"id":"idna-bidi-check","version":"1.0.0","description":"Apply the RFC 5893 Bidi Rule to one label and name the first failing condition.","supported_operations":["check the idna bidi rule","rfc 5893 label direction test","right to left label ending check","does this label mix arabic and european digits","bidi condition for a domain label","when does the bidi rule apply","בדיקת כיוון אותיות בתווית"],"unsupported_operations":["reject disallowed code points","punycode encode the label","apply one bidi rule to a whole multi-label domain"],"semantics":["RFC 5893 only. Disallowed characters, hyphens, NFC, and punycode are not judged.","enforce when_rtl: if the label has no Bidi_Class R, AL, or AN, applicable is false, valid is true, and direction is none.","enforce always: the six conditions run even when no RTL class is present. A first class other than L, R, or AL fails bidi_condition_1.","direction is rtl when the first class is R or AL, ltr when it is L, and none otherwise. RTL then checks conditions 2, 3, and 4. LTR checks 5 then 6. The first failure wins.","reason_index and cp identify the failing code point. first_rtl_index is the first R, AL, or AN, or null.","Results are not a homograph, phishing, DNS, or authenticity verdict. No DNS query is performed."],"limits":{"max_label_bytes":252,"max_output_bytes":8192},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["label","enforce"],"properties":{"label":{"type":"string","minLength":1,"maxLength":252},"enforce":{"type":"string","enum":["when_rtl","always"]}}},"output_schema":{"type":"object","additionalProperties":false,"required":["valid","applicable","direction","reason","reason_index","cp","first_rtl_index","data_version"],"properties":{"valid":{"type":"boolean"},"applicable":{"type":"boolean"},"direction":{"type":"string","enum":["ltr","rtl","none"]},"reason":{"type":["string","null"],"enum":[null,"bidi_condition_1","bidi_condition_2","bidi_condition_3","bidi_condition_4","bidi_condition_5","bidi_condition_6"]},"reason_index":{"type":["integer","null"],"minimum":0,"maximum":251},"cp":{"type":["integer","null"],"minimum":0,"maximum":1114111},"first_rtl_index":{"type":["integer","null"],"minimum":0,"maximum":251},"data_version":{"type":"string","const":"idna2008-rfc5892-unicode-15.1.0"}}},"examples":[{"input":{"label":"a","enforce":"when_rtl"},"output":{"valid":true,"applicable":false,"direction":"none","reason":null,"reason_index":null,"cp":null,"first_rtl_index":null,"data_version":"idna2008-rfc5892-unicode-15.1.0"}},{"input":{"label":"אa","enforce":"when_rtl"},"output":{"valid":false,"applicable":true,"direction":"rtl","reason":"bidi_condition_2","reason_index":1,"cp":97,"first_rtl_index":0,"data_version":"idna2008-rfc5892-unicode-15.1.0"}},{"input":{"label":"1","enforce":"always"},"output":{"valid":false,"applicable":true,"direction":"none","reason":"bidi_condition_1","reason_index":0,"cp":49,"first_rtl_index":null,"data_version":"idna2008-rfc5892-unicode-15.1.0"}}],"execute_url":"/v1/tools/idna-bidi-check/versions/1.0.0/execute"}