upstream V3 development https://www.gnusocial.rocks/v3
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

NicknameTooShortException.php 1.8 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. // {{{ License
  3. // This file is part of GNU social - https://www.gnu.org/software/social
  4. //
  5. // GNU social is free software: you can redistribute it and/or modify
  6. // it under the terms of the GNU Affero General Public License as published by
  7. // the Free Software Foundation, either version 3 of the License, or
  8. // (at your option) any later version.
  9. //
  10. // GNU social is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. // GNU Affero General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU Affero General Public License
  16. // along with GNU social. If not, see <http://www.gnu.org/licenses/>.
  17. // }}}
  18. /**
  19. * Nickname too long exception
  20. *
  21. * @category Exception
  22. * @package GNUsocial
  23. *
  24. * @author Zach Copley <zach@status.net>
  25. * @copyright 2010 StatusNet Inc.
  26. * @author Brion Vibber <brion@pobox.com>
  27. * @author Mikael Nordfeldth <mmn@hethane.se>
  28. * @author Nym Coy <nymcoy@gmail.com>
  29. * @copyright 2009-2014 Free Software Foundation, Inc http://www.fsf.org
  30. * @auuthor Daniel Supernault <danielsupernault@gmail.com>
  31. * @auuthor Diogo Cordeiro <diogo@fc.up.pt>
  32. *
  33. * @author Hugo Sales <hugo@hsal.es>
  34. * @copyright 2018-2021 Free Software Foundation, Inc http://www.fsf.org
  35. * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
  36. */
  37. namespace App\Util\Exception;
  38. use function App\Core\I18n\_m;
  39. use App\Util\Common;
  40. class NicknameTooShortException extends NicknameInvalidException
  41. {
  42. protected function defaultMessage(): string
  43. {
  44. // TRANS: Validation error in form for registration, profile and group settings, etc.
  45. return _m(['Nickname cannot be less than # character long.'], ['count' => Common::config('nickname', 'min_length')]);
  46. }
  47. }