diff options
| author | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2024-04-05 19:09:07 +0530 | 
|---|---|---|
| committer | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2024-04-05 19:09:07 +0530 | 
| commit | 73d7fe9411f4a9a0b849d9b42051e67ca19c25ec (patch) | |
| tree | 91035198021ade4b1ec98012d9799827e9d9711c /errors/errors.go | |
| parent | 10aed3cea7935f2f22ef713cff9839dd16afce48 (diff) | |
validating username upon account creation
Diffstat (limited to 'errors/errors.go')
| -rw-r--r-- | errors/errors.go | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/errors/errors.go b/errors/errors.go index c16bd52..0d88490 100644 --- a/errors/errors.go +++ b/errors/errors.go @@ -1,5 +1,5 @@  /* openbills - Server for web based Libre Billing Software - * Copyright (C) 2023  Vidhu Kant Sharma <vidhukant@vidhukant.com> + * Copyright (C) 2023-2024  Vidhu Kant Sharma <vidhukant@vidhukant.com>   *   * This program is free software: you can redistribute it and/or modify   * it under the terms of the GNU General Public License as published by @@ -31,6 +31,9 @@ var (  	ErrEmptyContactName       = errors.New("Contact Name Cannot Be Empty")  	ErrInvalidGSTIN           = errors.New("Invalid GSTIN")  	ErrInvalidEmail           = errors.New("Invalid E-Mail Address") +  ErrEmptyEmail             = errors.New("E-Mail Address Cannot Be Empty") +  ErrInvalidUsername        = errors.New("Invalid Username") +  ErrEmptyUsername          = errors.New("Username Cannot Be Empty")  	ErrInvalidPhone           = errors.New("Invalid Phone Number")  	ErrInvalidWebsite         = errors.New("Invalid Website URL")  	ErrEmptyBrandName         = errors.New("Brand Name Cannot Be Empty") @@ -38,6 +41,8 @@ var (  	ErrInvalidGSTPercentage   = errors.New("Invalid GST Percentage")  	ErrPasswordTooShort       = errors.New("Password Is Too Short")  	ErrPasswordTooLong        = errors.New("Password Is Too Long") +	ErrUsernameTooShort       = errors.New("Username Is Too Short") +	ErrUsernameTooLong        = errors.New("Username Is Too Long")  	ErrInvalidLoginMethod     = errors.New("Login Method Can Only Be 'email' Or 'username'")  	// 401  |