Skip to content

Commit

Permalink
chore: update schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Chisomchima committed Nov 27, 2024
1 parent 4091121 commit 66da56f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
27 changes: 23 additions & 4 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2024-11-25T10:03:10.019Z\n"
"PO-Revision-Date: 2024-11-25T10:03:10.019Z\n"
"POT-Creation-Date: 2024-11-27T08:30:38.416Z\n"
"PO-Revision-Date: 2024-11-27T08:30:38.417Z\n"

msgid "schemas"
msgstr "schemas"
Expand Down Expand Up @@ -891,6 +891,9 @@ msgstr "This field requires a unique value, please choose another one"
msgid "{{label}} (required)"
msgstr "{{label}} (required)"

msgid "Should not exceed {{maxLength}} characters"
msgstr "Should not exceed {{maxLength}} characters"

msgid "No changes to be saved"
msgstr "No changes to be saved"

Expand Down Expand Up @@ -1241,8 +1244,8 @@ msgstr ""
"Choose where this new organisation unit should be placed in the existing "
"hierarchy"

msgid "Set up the basic information for this organisation unit."
msgstr "Set up the basic information for this organisation unit."
msgid "Set up the basic information for this organisation unit"
msgstr "Set up the basic information for this organisation unit"

msgid "Opening date"
msgstr "Opening date"
Expand Down Expand Up @@ -1311,6 +1314,22 @@ msgstr ""
"This is the first organisation unit and will be created as the root of the "
"hierarchy."

msgid "Must be a valid mobile number"
msgstr "Must be a valid mobile number"

msgid "Must be a valid url"
msgstr "Must be a valid url"

msgid ""
"Longitude should be between -90 and 90. Latitude should be between -180 and "
"180"
msgstr ""
"Longitude should be between -90 and 90. Latitude should be between -180 and "
"180"

msgid "Parent organisation unit cannot be itself or a descendant of itself."
msgstr "Parent organisation unit cannot be itself or a descendant of itself."

msgid "No organisation units available"
msgstr "No organisation units available"

Expand Down
6 changes: 4 additions & 2 deletions src/pages/indicatorTypes/form/IndicatorTypesSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ export const IndicatorSchema = identifiable.extend({
factor: z.coerce
.number({ invalid_type_error: 'Please enter a number' })
.int()
.min(1, 'Please enter a value above 0')
.max(
Number.MAX_SAFE_INTEGER,
`The number is too large. Please enter a valid integer.`
),
)
.refine((value) => value !== 0, {
message: 'Zero is not a valid value for factor',
}),
})

export const initialValues = getDefaults(IndicatorSchema)
Expand Down

0 comments on commit 66da56f

Please sign in to comment.