Skip to content

Commit 5a01f2d

Browse files
committed
docs: document validation rules
1 parent 0fdcc2b commit 5a01f2d

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,24 @@ InspectLink::isClassic($classicUrl); // true
102102

103103
---
104104

105+
## Validation rules
106+
107+
`deserialize()` enforces:
108+
109+
| Rule | Limit | Exception |
110+
|------|-------|-----------|
111+
| Hex payload length | max 4,096 characters | `InvalidArgumentException` |
112+
| Protobuf field count | max 100 per message | `OverflowException` |
113+
114+
`serialize()` enforces:
115+
116+
| Field | Constraint | Exception |
117+
|-------|-----------|-----------|
118+
| `paintwear` | `[0.0, 1.0]` | `InvalidArgumentException` |
119+
| `customname` | max 100 characters | `InvalidArgumentException` |
120+
121+
---
122+
105123
## How the format works
106124

107125
Three URL formats are handled:

0 commit comments

Comments
 (0)