Skip to content

🔧 [ENHANCEMENT] - Move validateEmail function to email.js #3

@isonnymichael

Description

@isonnymichael

Summary

The email validation logic is currently defined inside the main source file. To improve modularity and separation of concerns, the email validation function should be extracted to its own file.

Current Behavior

The function validateEmail(email) is written inline in src/index.js, alongside unrelated logic like phone validation and error handling.

Suggested Improvement

  • Create a new file: src/validators/email.js
  • Move the validateEmail function to that file
  • Export it as a named function: export function validateEmail(...)
  • Re-import it in src/index.js for use within validateForm

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions