Skip to content

Commit e2f46b8

Browse files
committed
docs: document validation rules
1 parent e5d1425 commit e2f46b8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,24 @@ is_classic(classic_url) # True
9898

9999
---
100100

101+
## Validation rules
102+
103+
`deserialize()` enforces:
104+
105+
| Rule | Limit | Exception |
106+
|------|-------|-----------|
107+
| Hex payload length | max 4,096 characters | `ValueError` |
108+
| Protobuf field count | max 100 per message | `ValueError` |
109+
110+
`serialize()` enforces:
111+
112+
| Field | Constraint | Exception |
113+
|-------|-----------|-----------|
114+
| `paintwear` | `[0.0, 1.0]` | `ValueError` |
115+
| `customname` | max 100 characters | `ValueError` |
116+
117+
---
118+
101119
## How the format works
102120

103121
Three URL formats are handled:

0 commit comments

Comments
 (0)