Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@larrycoal
Copy link
Contributor

@larrycoal larrycoal commented Mar 4, 2022

What changed

Added validation to add event form
Display error message

How to test

try to save a new event while omitting the required form fields (event type,name,startDate) this fields has a validation attached to it and requires they are not null

Go To

https://thirsty-lalande-50b52c.netlify.app/
My Profile ---> Add Event ---> click Save without filling all fields

Closes #166

@larrycoal larrycoal closed this Mar 4, 2022
@larrycoal larrycoal reopened this Mar 4, 2022
@larrycoal larrycoal changed the base branch from main to beta March 4, 2022 00:22
@larrycoal larrycoal requested a review from razbakov March 4, 2022 00:23
Copy link
Contributor

@amanuela97 amanuela97 left a comment

Choose a reason for hiding this comment

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

A link for testing ?

@razbakov razbakov changed the title Form validation chore: form validation #166 Mar 4, 2022
@razbakov razbakov linked an issue Mar 4, 2022 that may be closed by this pull request
@razbakov razbakov changed the title chore: form validation #166 form validation #166 Mar 4, 2022
@larrycoal larrycoal requested review from amanuela97 and razbakov March 4, 2022 18:48
</div>
<div v-if="error" class="py-4 text-right text-red-500">
{{ error.message }}
{{ errorMessage }}
Copy link
Contributor

Choose a reason for hiding this comment

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

i think this is no longer needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah its not

@larrycoal larrycoal requested a review from amanuela97 March 7, 2022 18:46
Copy link
Contributor

@razbakov razbakov left a comment

Choose a reason for hiding this comment

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

Please create a demo page with a custom form. I can't register/login neither with Google (auth domain is not configured) nor with email (it requires city to be filled, but autocomplete service is not configured)

},
error: {
type: String,
default: null,
Copy link
Contributor

Choose a reason for hiding this comment

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

I would rather use empty string here to comply with type. AFAIK null is an object.

Suggested change
default: null,
default: '',

@razbakov razbakov force-pushed the beta branch 2 times, most recently from b04c682 to 057d70e Compare February 13, 2024 20:19
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.

Form Validation

5 participants