max-length in json

This commit is contained in:
Ben Mitchinson committed 2020-04-27 20:33:53 -05:00
1 parent 2130d5903d
commit 0b8f032476
2 files changed
+4 -3

No files matched your search

+2 -1
View File
@@ -125,7 +125,8 @@
"id": "pregnancy",
"text-input-title": "Weeks",
"text-input-id": "pregnancy-weeks",
"text-input-type": "number"
"text-input-type": "number",
"max-length": 2
},
{
"group-title": "Dermatological",
+2 -2
View File
@@ -62,8 +62,8 @@ export default function DiagnosisForm(): ReactElement {
: 'text'
}
maxLength={
field['text-input-id'] === 'pregnancy-weeks'
? 2
field['max-length']
? field['max-length']
: null
}
/>