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

feature: updating the validations API #8

Merged
merged 8 commits into from
May 12, 2024
Merged

Conversation

paganotoni
Copy link
Contributor

@tatang26
Copy link
Contributor

tatang26 commented May 9, 2024

Thank you @paganotoni this looks good to me

@paganotoni
Copy link
Contributor Author

@tatang26 I'll continue giving this shape.

Validations are a set of rules stablished for different fields passed in the request. You can define these Validations to be used in your http handlers by and call the `form.Validate` function passing the `req` (*http.Request) and handling the `validate.Errors` returned. Example:

```go
newUserValidation := validate.Form{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tatang26 take a look at this. This is where I'm landing.

Validations are a set of rules stablished for different fields passed in the request. You can define these Validations to be used in your http handlers by and call the `form.Validate` function passing the `req` (*http.Request) and handling the `validate.Errors` returned. Example:

```go
newUserValidation := validate.Form(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tatang26 👀

@@ -1,69 +1,54 @@
package validation
package validate_test
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tatang26 I would like to rewrite these as they repeat a lot of things.

@paganotoni paganotoni merged commit df595da into main May 12, 2024
1 check passed
@paganotoni paganotoni deleted the refining-validations branch May 12, 2024 14:38
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.

None yet

2 participants