Skip to content

Comments

feat: add validation for empty options while setting two factor auth#52

Merged
Baspa merged 6 commits intobackstagephp:mainfrom
lucascnunes:feature/validation-selecting-factors
Nov 14, 2024
Merged

feat: add validation for empty options while setting two factor auth#52
Baspa merged 6 commits intobackstagephp:mainfrom
lucascnunes:feature/validation-selecting-factors

Conversation

@lucascnunes
Copy link
Contributor

Adding validation to the form while setting up the Two Factor Authentication, if the user doesn't select any option, was returning an error.

Captura de Tela 2024-10-12 às 13 29 10

@Baspa Baspa self-assigned this Oct 14, 2024
@lucascnunes
Copy link
Contributor Author

What do you think of this approach? Defining a default value from the beginning avoiding the null value error?

@Baspa
Copy link
Contributor

Baspa commented Nov 12, 2024

What do you think of this approach? Defining a default value from the beginning avoiding the null value error?

Excuse me for the late response, I was on a holiday. I will check it asap.

@Baspa
Copy link
Contributor

Baspa commented Nov 12, 2024

Is it possible for you to fix the PHPStan errors? The solutions seems good to me @lucascnunes

@lucascnunes
Copy link
Contributor Author

Is it possible for you to fix the PHPStan errors? The solutions seems good to me @lucascnunes

Working on it

@Baspa
Copy link
Contributor

Baspa commented Nov 13, 2024

Seems like these errors are still happening @lucascnunes:

Error: Unable to resolve the template type TKey in call to function collect
Error: Unable to resolve the template type TValue in call to function collect
Error: Ternary operator condition is always true.
Error: Process completed with exit code 1.

@lucascnunes
Copy link
Contributor Author

lucascnunes commented Nov 13, 2024

I'm having difficulties to test it locally,
When I run locally it gives no errors, what am I missing?

Screenshot 2024-11-13 at 14 52 21

@Baspa
Copy link
Contributor

Baspa commented Nov 13, 2024

Seems like you didn't commit changes, I don't see any changes in your last commit @lucascnunes

@lucascnunes lucascnunes force-pushed the feature/validation-selecting-factors branch from b73de07 to 750f3c4 Compare November 13, 2024 17:58
@lucascnunes
Copy link
Contributor Author

lucascnunes commented Nov 13, 2024

Finally! 😅

I've never used PHPStan, have no idea what type of error was that.

If it's all correct, I'm glad I could help a little bit, thanks for the opportunity.

@Baspa
Copy link
Contributor

Baspa commented Nov 14, 2024

Finally! 😅

I've never used PHPStan, have no idea what type of error was that.

If it's all correct, I'm glad I could help a little bit, thanks for the opportunity.

Thanks! I will merge the PR

@Baspa Baspa merged commit 5a9d426 into backstagephp:main Nov 14, 2024
@lucascnunes lucascnunes deleted the feature/validation-selecting-factors branch November 21, 2024 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants