Skip to content

Commit

Permalink
Merge pull request #66 from open-formulieren/Viicos-patch-1
Browse files Browse the repository at this point in the history
Fix typo in `postcode` validation
  • Loading branch information
sergei-maertens authored Nov 24, 2023
2 parents 2d70ee2 + eb7b418 commit a9725b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/registry/postcode/edit-validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {buildCommonSchema, getErrorMap, isInvalidStringIssue} from '@/registry/v
import {POSTCODE_REGEX} from './constants';

const VALIDATION_MESSAGES = defineMessages({
email: {
postcode: {
description: 'Invalid postcode format validation error',
defaultMessage: '{field} must be a valid postcode.',
},
Expand All @@ -19,7 +19,7 @@ const buildDefaultValueSchema = (intl: IntlShape) => {
errorMap: getErrorMap(issue => {
if (isInvalidStringIssue(issue) && issue.validation === 'regex') {
const fieldLabel = intl.formatMessage(LABELS.defaultValue);
return intl.formatMessage(VALIDATION_MESSAGES.email, {field: fieldLabel});
return intl.formatMessage(VALIDATION_MESSAGES.postcode, {field: fieldLabel});
}
return;
}),
Expand Down

0 comments on commit a9725b3

Please sign in to comment.