diff --git a/lib/validators/belgiumBallotValidator.ts b/lib/validators/belgiumBallotValidator.ts index 344dc5e7..74bbc19c 100644 --- a/lib/validators/belgiumBallotValidator.ts +++ b/lib/validators/belgiumBallotValidator.ts @@ -1,4 +1,5 @@ import { ContestContent, OptionSelection, SelectionPile } from '../av_client/types'; +import { Error } from "../av_client/types" class BelgiumBallotValidator { private contest: ContestContent; @@ -6,10 +7,10 @@ class BelgiumBallotValidator { this.contest = contest; } - validate(selectionPile: SelectionPile): string[] { - const errors: string[] = []; + validate(selectionPile: SelectionPile): Error[] { + const errors: Error[] = []; - if (this.partyExclusive(selectionPile.optionSelections)) errors.push('cross_party_voting'); + if (this.partyExclusive(selectionPile.optionSelections)) errors.push({ message: 'cross_party_voting' }); return errors } diff --git a/package.json b/package.json index 56858cb2..b37b1515 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "4.0.0", + "version": "4.0.1", "name": "@aion-dk/js-client", "license": "MIT", "description": "Assembly Voting JS client",