From c9b6b9a5ca082fe7c1b6f58d7713f785a9eb6a5c Mon Sep 17 00:00:00 2001 From: Martial Simon Date: Mon, 15 Sep 2025 01:08:27 +0200 Subject: add: graphs et rushs --- graphs/js/accountConstraints/accountError.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 graphs/js/accountConstraints/accountError.js (limited to 'graphs/js/accountConstraints/accountError.js') diff --git a/graphs/js/accountConstraints/accountError.js b/graphs/js/accountConstraints/accountError.js new file mode 100644 index 0000000..9b427e0 --- /dev/null +++ b/graphs/js/accountConstraints/accountError.js @@ -0,0 +1,23 @@ +class InvalidUsernameError extends Error { + name = "InvalidUsernameError"; + constructor(message) { + super("Invalid username: " + message); + } +} +class InvalidPasswordError extends Error { + name = "InvalidPasswordError"; + constructor(message) { + super("Invalid password: " + message); + } +} +class InvalidYearOfBirthError extends Error { + name = "InvalidYearOfBirthError"; + constructor(message) { + super("Invalid birth year: " + message); + } +} +module.exports = { + InvalidPasswordError, + InvalidUsernameError, + InvalidYearOfBirthError, +}; -- cgit v1.2.3