Placing a Validation Rule Where It Can Be Reused
A domain rule should have a clear owner. Interfaces can present feedback while multiple writers use consistent storage constraints where necessary.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
Trace a numeric limit
A report accepts from one through ten attached items. An interface can catch an invalid count early, while the service enforces the same decision before committing. See form validation.
Check which guarantee belongs to storage
If independent writers can change that count, enforce durable rules there where possible. SQL checks illustrate a value-level constraint.[1]