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

Modified validators in few files according to new ValidateObject #13015

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Abhishek-Punhani
Copy link
Contributor

I have modified the validators function in three Vue files to incorporate the new validateObject function.

Reference Issue #8903

@github-actions github-actions bot added APP: Learn Re: Learn App (content, quizzes, lessons, etc.) DEV: frontend labels Jan 21, 2025
Copy link
Member

@nucleogenesis nucleogenesis left a comment

Choose a reason for hiding this comment

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

This looks good to me and addresses the particular instances noted in the linked issue.

It gets me wondering if it'd be worth codifying these pseudo type definitions for things like a ContentNode similar to this one I did for quiz-related data types. Would be nice to be able to say validator(val) { validateObject(ContentNodeSpec) }.

Maybe I will create an issue for that for the future :)

Thanks for this @Abhishek-Punhani !

@Abhishek-Punhani
Copy link
Contributor Author

Abhishek-Punhani commented Jan 23, 2025

@nucleogenesis Thank you for the feedback! I agree that codifying pseudo-type definitions for objects like ContentNode is a fantastic idea—it would greatly enhance consistency and readability throughout the codebase. If an issue is created for this, I’d be happy to contribute to its implementation.
Please let me know if there’s anything else you’d like me to address or adjust. Are there any additional steps required before this can be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APP: Learn Re: Learn App (content, quizzes, lessons, etc.) DEV: frontend TODO: needs review Waiting for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants