Skip to content

Commit

Permalink
fix(deriv_auth_ui): login button enabled on invalid email and password (
Browse files Browse the repository at this point in the history
#366)

* fix: update with latest master

* chore: ignore dependent package lint

* fix: login button enabled on invalid email and password
  • Loading branch information
sahani-deriv authored Dec 21, 2023
1 parent e44a618 commit 5109a0c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 1 addition & 3 deletions packages/deriv_auth_ui/example/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ linter:
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

depend_on_referenced_packages: false
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ class ExampleLoginService extends BaseAuthService {

@override
Future<AuthorizeEntity> onLoginRequest(
GetTokensRequestModel request, [
Function? onInvalidJwtToken,
]) async =>
{required GetTokensRequestModel request, String? userAgent}) async =>
const AuthorizeEntity();

@override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ class _DerivLoginLayoutState extends State<DerivLoginLayout> {
}

bool _isFormValid() =>
_getEmailValue().isNotEmpty && _passwordController.text.isNotEmpty;
_getEmailValue().isValidEmail &&
_passwordController.text.isValidLoginPasswordLength;

String? _emailValidator(String? input) {
if (_getEmailValue().isValidEmail) {
Expand Down

0 comments on commit 5109a0c

Please sign in to comment.