Skip to content

Commit

Permalink
fix: validator langAlt message value
Browse files Browse the repository at this point in the history
  • Loading branch information
fufeck committed Jan 6, 2025
1 parent 2e18efb commit c019203
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/shared/src/validators/validator_bal.validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ export class ValidatorBal implements ValidatorConstraintInterface {

defaultMessage(args: ValidationArguments) {
const field = args.constraints[0];
return 'Le champ ' + field + ' : ' + args.value + " n'est pas valide";
const value =
field === 'langAlt' ? Object.values(args.value)[0] : args.value;
return 'Le champ ' + field + ' : ' + value + " n'est pas valide";
}
}

0 comments on commit c019203

Please sign in to comment.