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

Remove EditForm and Regular Expressions to cut dependencies. #55

Merged
merged 5 commits into from
Feb 23, 2024

Conversation

jongalloway
Copy link
Collaborator

@jongalloway jongalloway commented Feb 15, 2024

Refactor URL validation and form handling in LinkBundle and NewLink

Refactored the validation process for the VanityUrl property in the LinkBundle class to check for letters, numbers, and dashes without using regex. The NewLink.razor file was significantly refactored, replacing the EditForm component with a standard HTML form and the OnValidSubmit method with an OnSubmit method that includes a URL validation check. The Link and LinkBundle classes no longer use data annotations or regular expressions for URL validation. Minor refactoring was also done on the GetOpenGraphInfoForLink method in NewLink.razor, mainly for code formatting and indentation.

Reference on removing EditForm: dotnet/runtime#38439

Refactor URL validation and form handling in LinkBundle and NewLink

Refactored the validation process for the `VanityUrl` property in the `LinkBundle` class to check for letters, numbers, and dashes without using regex. The `NewLink.razor` file was significantly refactored, replacing the `EditForm` component with a standard HTML form and the `OnValidSubmit` method with an `OnSubmit` method that includes a URL validation check. The `Link` and `LinkBundle` classes no longer use data annotations or regular expressions for URL validation. Minor refactoring was also done on the `GetOpenGraphInfoForLink` method in `NewLink.razor`, mainly for code formatting and indentation.
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-forest-0ccd7d90f-55.eastus2.3.azurestaticapps.net

Update PR with SVG banner
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-forest-0ccd7d90f-55.eastus2.3.azurestaticapps.net

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-forest-0ccd7d90f-55.eastus2.3.azurestaticapps.net

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-forest-0ccd7d90f-55.eastus2.3.azurestaticapps.net

@jongalloway jongalloway merged commit 740602f into main Feb 23, 2024
2 checks passed
@jongalloway jongalloway deleted the eliminate-form branch February 23, 2024 20:44
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.

1 participant