Skip to content

Commit

Permalink
fix: Add default error message for input validation (#1263)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSlimvReal authored May 12, 2022
1 parent 97a7ecd commit 59b35e0
Show file tree
Hide file tree
Showing 4 changed files with 196 additions and 324 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,12 @@ export class DynamicValidatorsService {
case "matDatepickerParse":
return $localize`Please enter a valid date`;
default:
throw new Error("No description defined for validator " + validator);
this.loggingService.error(
`No description defined for validator "${validator}": ${JSON.stringify(
validationValue
)}`
);
throw $localize`Invalid input`;
}
}
}
Loading

0 comments on commit 59b35e0

Please sign in to comment.