Fix username validation and exception handling #89

Merged
NaiJi merged 3 commits from naiji-dev into master 2022-05-04 22:38:10 +03:00
Collaborator
  1. Refactor string validation classes
  2. Rename string validation assets for length
  3. Improve exception handling when server is not able to create requested username
1. Refactor string validation classes 2. Rename string validation assets for length 3. Improve exception handling when server is not able to create requested username
NaiJi added the
Bug
label 2022-05-02 14:59:54 +03:00
inex was assigned by NaiJi 2022-05-02 14:59:54 +03:00
NaiJi added 1 commit 2022-05-02 14:59:55 +03:00
4c99579f13 Fix username validation and exception handling
1. Refactor string validation classes
2. Rename string validation assets for length
3. Improve exception handling when server is not able to create requested server
inex approved these changes 2022-05-02 15:31:38 +03:00
NaiJi added 1 commit 2022-05-04 19:58:56 +03:00
4c7cf05578 Refactor FieldCubit creation for user forms
Move all cubit fields to a special factory which encapsulates all logic related to their default properties, which leaves possibility for future dependency inversion on that factory or future factories of other cubit fields (in case we will have to replace it with other implementations).
NaiJi requested review from inex 2022-05-04 20:45:00 +03:00
inex requested changes 2022-05-04 21:15:52 +03:00
inex left a comment
Owner

В общем, надо переделать все комментарии в коде. Ты пишешь не комментарии, а документацию.

Если хочешь её оставить, то её надо оформить как документацию.

В остальном, вроде норм.

Прогони ещё flutter format . перед коммитом.

В общем, надо переделать все комментарии в коде. Ты пишешь не комментарии, а документацию. Если хочешь её оставить, то её надо [оформить как документацию](https://dart.dev/guides/language/effective-dart/documentation). В остальном, вроде норм. Прогони ещё `flutter format .` перед коммитом.
@ -0,0 +7,4 @@
class FieldCubitFactory {
FieldCubitFactory(this.context);
/* A common user login field.

Incorrect docstring formatting. Never use this style of comments.

https://dart.dev/guides/language/effective-dart/documentation#dont-use-block-comments-for-documentation

This also could have been a doctring.

Incorrect docstring formatting. Never use this style of comments. https://dart.dev/guides/language/effective-dart/documentation#dont-use-block-comments-for-documentation This also could have been a doctring.
NaiJi marked this conversation as resolved
@ -0,0 +35,4 @@
);
}
/* A common user password field.

Same, wrong docstring formatting

Same, wrong docstring formatting
NaiJi marked this conversation as resolved
@ -12,2 +13,4 @@
}
}
// String must be equal to [length]

This is a documentation comment. Consider making it docstring (three slashes) or removing it entirely, if the class name is enough.

IDE will use docstrings in intellisense. It won't use usual comments.

This is a documentation comment. Consider making it docstring (three slashes) or removing it entirely, if the class name is enough. IDE will use docstrings in intellisense. It won't use usual comments.
NaiJi marked this conversation as resolved
Poster
Collaborator

Что? @@ Почему это документация, а не комментарии. Это именно что для других кодеров, безо всякого доксигена и тд. Не совсем понимаю, о чём ты

Что? @@ Почему это документация, а не комментарии. Это именно что для других кодеров, безо всякого доксигена и тд. Не совсем понимаю, о чём ты
NaiJi requested review from inex 2022-05-04 21:39:29 +03:00
NaiJi added 1 commit 2022-05-04 22:32:32 +03:00
inex approved these changes 2022-05-04 22:34:48 +03:00
NaiJi requested review from inex 2022-05-04 22:36:24 +03:00
NaiJi merged commit c4ae2b3b4f into master 2022-05-04 22:38:10 +03:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: SelfPrivacy/selfprivacy.org.app#89
There is no content yet.