Altinn / Altinn/app-frontend-react

Feil når man sender inn string fra array til validering

Open
#2,211 1 comment 0 reactions 0 assignees View on GitHub
kind/feature-request quality/debt
Dominant language
TypeScript
Stars
21
Forks
33
Avg merge
6d 23h
Merged PRs (30d)
3

Description

### Description of the bug

Gitt at du feks har et array kart med string-values koord og tekst som i eksempel. Disse sendes så inn til følgende validering errors = [
...(this.validateDataModelBindingsAny(ctx, 'wkt', ['string', 'array'])[0] || []),
...(this.validateDataModelBindingsAny(ctx, 'label', ['string'])[0] || [])

og feiler

![image](https://github.com/Altinn/app-frontend-react/assets/129747871/5a190648-b40f-45b5-a0fc-88267d673516)

### Steps To Reproduce

Se description

### Additional Information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the validateDataModelBindingsAny entry point and reproduce the validation described in the issue using an array map containing string values such as coordinates and text. Trace why passing the string and array type combinations produces the reported error; done means the described validation no longer fails incorrectly, with the relevant behavior covered by an appropriate test if one exists.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.