25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 lines
895 B

  1. const NAME_MIN = 3;
  2. const NAME_MAX = 60;
  3. // Errors constant name is created from:
  4. // 1: uppercase input name + _ + (eg: NAME)
  5. // 2: error type serverd by joi + _ + (eg: MIN)
  6. // 3: ERROR
  7. // 4: final constant name: NAME_MIN_ERROR
  8. const NAME_MIN_ERROR = `Name length must be at least ${NAME_MIN} characters long`;
  9. const NAME_MAX_ERROR = `Name length must be less than or equal to ${NAME_MAX} characters long`;
  10. const USERNAME_EMAIL_ERROR = 'Email must be a valid email address';
  11. const UPDATE_INFO_SUCCESS_MESSAGE = 'Profile successfully updated.';
  12. const UPDATE_INFO_ERROR_MESSAGE = 'Could not save your account information';
  13. const FETCH_INFO_ERROR_MESSAGE = 'Could not fetch your account information';
  14. module.exports = {
  15. NAME_MIN,
  16. NAME_MAX,
  17. NAME_MIN_ERROR,
  18. NAME_MAX_ERROR,
  19. USERNAME_EMAIL_ERROR,
  20. UPDATE_INFO_SUCCESS_MESSAGE,
  21. UPDATE_INFO_ERROR_MESSAGE,
  22. FETCH_INFO_ERROR_MESSAGE,
  23. };