Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fil-480] Add validation to add storage providers input #166

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

Filip-L
Copy link
Collaborator

@Filip-L Filip-L commented Dec 10, 2024

No description provided.

@Filip-L Filip-L force-pushed the FIL-480-add-validation-to-add-storage-providers-input branch from eca690c to 911a787 Compare December 10, 2024 16:43
Copy link
Collaborator

@kacperzuk-neti kacperzuk-neti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get approval from @tplocic20 before merging please.

src/components/cards/dialogs/allowedSps/AllowedSps.tsx Outdated Show resolved Hide resolved
Comment on lines +106 to +108
} else if (!isValidInput(value)) {
updatedErrors[index] = 'Invalid storage provider id'
setErrors([...updatedErrors])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tplocic20 what do you think about DYI form validation and debouncing? Is this the best way given the state of the app or is there some good lightweight lib we could include?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we would use something like hookForm - but it's too much of a refactor I'm afraid

@Filip-L Filip-L merged commit 36d8b66 into main Dec 16, 2024
5 checks passed
@Filip-L Filip-L deleted the FIL-480-add-validation-to-add-storage-providers-input branch December 16, 2024 18:29
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.

4 participants