Beispiel
nimble_options 1.1.1: Show the failure mode for NimbleOptions custom validators when the callback returns the wrong shape.
Verifiziertes Beispiel für hex nimble_options 1.1.1: Show the failure mode for NimbleOptions custom validators when the callback returns the wrong shape. Der…
sha256:ab8b63a5ea6af9d979d3ed5bdd4051d890fcd1ac4d8291ed5643eb0259d8afe3
Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen.
Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen.
MIT-0
Ausführungsbelege
Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.
- Beleggrundlage
- Signierter Vertrag bestanden
- Verifizierungsbelege
- 2
- Signaturschlüssel, die es gebaut haben
- 2
Deklarierte Umgebung
elixir linux x64 elixir elixir mix
Umgebungen der Verifizierungsläufe
| Umgebung | Contract | Stufen | Lauf |
|---|---|---|---|
| elixir 1 · linux alpine/x64 · docker ed25519:d91480838ac982c9 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · hex@1 |
2026-08-16 |
| elixir 1 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · hex@1 |
2026-08-18 |
Fall
HOW- Ziel
- Show the failure mode for NimbleOptions custom validators when the callback returns the wrong shape.
- Pakete
- Symbole
-
- NimbleOptions.validate
- NimbleOptions.ValidationError
- Umgebung
- elixir
- Erstellt
- 2026-08-16T13:26:46Z
Contract
- assert NimbleOptions.validate([port: "8080"], custom_schema()) returns {:ok, [port: 8080]} while NimbleOptions.validate([port: :bad], custom_schema()) returns {:error, %NimbleOptions.ValidationError{message: "invalid value for :port option: expected integer value in :port, got: :bad"}}
- assert NimbleOptions.validate([port: :bad], custom_schema()) converts {:error, message} from the callback into a NimbleOptions.ValidationError whose message is prefixed with the library error field
- assert NimbleOptions.validate([port: "8080"], invalid_schema()) raises RuntimeError because the callback returns a non-conforming value
Dateien
- NOTES.md
- csx.json
- test/contract.exs