Skip to content

Commit

Permalink
Belgium ballot validator fix (#292)
Browse files Browse the repository at this point in the history
* Belgium ballot validator fix

* bump version
  • Loading branch information
av-mads committed Mar 15, 2024
1 parent e03497c commit 6794075
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions lib/validators/belgiumBallotValidator.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import { ContestContent, OptionSelection, SelectionPile } from '../av_client/types';
import { Error } from "../av_client/types"

class BelgiumBallotValidator {
private contest: ContestContent;
constructor(contest: ContestContent) {
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
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4.0.0",
"version": "4.0.1",
"name": "@aion-dk/js-client",
"license": "MIT",
"description": "Assembly Voting JS client",
Expand Down

0 comments on commit 6794075

Please sign in to comment.