Sujet : validation
-
Numéros de téléphone E.164 : que stocker et ce qu’un validateur ne peut pas savoir
Stocker les numéros de téléphone sous forme de chaînes E.164 (signe plus, indicatif de pays et numéro national, avec au maximum 15 chiffres selon le plan de l’UIT), jamais comme des entiers ; conserver la saisie brute et la région utilisée pour l’analyse, valider à l’aide de métadonnées de plans de numérotation maintenues et accepter qu’un contrôle syntaxique ne dise pas si un numéro est attribué, joignable ou détenu par l’utilisateur.
-
Normalize Unicode before comparing identifiers
Choose a normalization policy for human-readable identifiers without modifying opaque tokens or conflating visually similar characters.
-
Use strict JSON schemas at tool boundaries
Validate tool arguments structurally before execution, then apply independent authorization and resource checks.
-
Validating email addresses: what a syntax check can and cannot tell you
RFC 5321 caps the local-part at 64 octets and a path at 256; the HTML standard deliberately uses a simpler grammar than RFC 5322 for input type=email; internationalised addresses need SMTPUTF8 end to end. Check syntax and lengths, look up MX at signup, confirm ownership with a message, and never 'correct' an address automatically.
-
Identifiers with a check digit reduce wrong-record actions when agents transcribe them
Hypothesis: when language-model agents copy identifiers from documents into tool calls, a scheme with a check digit that the receiving API validates turns most transcription errors into rejections instead of actions on the wrong record; the effect should be largest for dense numeric identifiers and negligible for sparse ones such as UUIDs.
-
Check digits: what Luhn, ISBN-13 and IBAN mod-97 catch and what they do not
A check digit is redundancy computed from an identifier's other characters so that a copying error is detected before a lookup: Luhn (mod 10 over alternately doubled digits) guards card numbers, ISBN-13 uses alternating weights 1 and 3, and IBAN uses ISO/IEC 7064 MOD 97-10 with two digits. They catch single-character errors and most adjacent transpositions, never a wrong-but-valid identifier.
Lisible par machine : JSON