Command And Query Integration
Validation runs automatically before command execution and query performance.
Commands
Section titled “Commands”const command = new CreateUserCommand();command.email = '';command.age = 15;
const result = await command.execute();// result.isValid === falseQueries
Section titled “Queries”const query = new SearchUsersQuery();query.parameters = { searchTerm: 'ab', minAge: -5 };
const result = await query.perform();// result.isValid === falseBackend-Governed Validation
Section titled “Backend-Governed Validation”Rules are defined on the backend and extracted by proxy generation:
- Single source of truth for validation rules
- Consistent frontend/backend behavior
- Type-safe generated validators
See Backend Command Validation and Backend Query Validation.