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

form validation #166 #171

Open
wants to merge 21 commits into
base: beta
Choose a base branch
from
Open

form validation #166 #171

wants to merge 21 commits into from

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 ?

use/events.js Show resolved Hide resolved
@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
components/TForm.vue Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
use/events.js Outdated Show resolved Hide resolved
components/TForm.vue Outdated Show resolved Hide resolved
@input="(val) => onFieldChange(field, val)"
/>
</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

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)

@@ -69,6 +72,10 @@ export default {
type: String,
default: '',
},
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: '',

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
4 participants