Skip to content

Cratis Arc frontend validation

Cratis Arc frontend validation catches invalid input before a command or query request reaches the server. Generated TypeScript validators give your UI early feedback from supported backend rules; the server remains responsible for enforcing validation and authorization.

Start with rules on a discoverable backend command or query, then generate its proxy. When supported rules are extracted, the proxy has an attached validator that runs automatically. You do not need to wire it into each request by hand. Generated rules cover only part of backend validation, so a passing client check does not establish that the server will accept the request.

Capability What It Covers Learn More
Fluent rules API Define property rules and choose messages for invalid input Rules And Fluent API
Command/query integration Understand when local validation prevents a request Command And Query Integration
Validation payloads Read the members, messages, severities, and reasons in a result Validation Results
Severity-based execution gating Decide when warnings should stop a write for confirmation Severity Filtering

For your first generated validator, follow proxy generation validation. It explains which backend rules can be extracted and how to inspect the generated output. Validator constructors run during extraction, so keep I/O and service calls out of rule construction.