Altinn / Altinn/app-frontend-react

(Custom) validation should work in stateless forms, and prevent user from submitting via `InstantiationButton`

Open
#1,735 0 comments 0 reactions 0 assignees View on GitHub
area/validation kind/feature-request
Dominant language
TypeScript
Stars
21
Forks
33
Avg merge
6d 23h
Merged PRs (30d)
3

Description

When in a stateless form, the backend never stores anything, and thus backend-based validation does not work. However, we have validation support using expressions (and via JsonSchema, and `required`-validation), so we should still make sure to run those validations and prevent the user from "submitting" the stateless form via `InstantiationButton` if the form does not validate correctly.

### Relevant links
- https://altinn.slack.com/archives/CCQEQKGJD/p1705408256631589

Contributor guide

Open the contributing guide

Research direction

Start by tracing stateless form handling and the InstantiationButton submission path, then compare how expression, JsonSchema, and required validation are applied. Done means those validations run for stateless forms and an invalid form cannot be submitted through InstantiationButton.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.