Skip to content

Add Form Input Validations and Error Toast Messages #3

@rishima17

Description

@rishima17

Description

Currently, users can submit empty inputs or duplicate keys in some dialogs. We need to strengthen user input validations on all forms (Login, Registration, Session Code entry, and Create Lecture dialog) and display descriptive toast notifications when validation fails.

Acceptance Criteria

  • Login/Register: Validate that email/ID fields are not empty, and password is at least 6 characters long.
  • Session Code: Ensure the student input accepts exactly a 6-character alphanumeric code, auto-uppercasing lowercase letters.
  • Create Lecture: Require both the Topic and Subject fields to be non-empty.
  • Feedback: Display a friendly warning if the student tries to submit without choosing "Understanding" or "Attention" levels.
  • Use the existing sonner toaster configuration to display error, warning, and success alerts.

Suggested Files to Edit

  • lecture-pulse/src/pages/Login.jsx
  • lecture-pulse/src/pages/StudentFeedback.jsx
  • lecture-pulse/src/components/CreateLectureDialog.jsx

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions