Skip to content

🔧 [ENHANCEMENT] - Move validateEmail function to validators/email.js #4

@isonnymichael

Description

@isonnymichael

Summary

The phone number validation logic is currently embedded inside the main form validator file. For better organization and testability, this logic should be extracted to its own dedicated module.

Current Behavior

validatePhoneNumber(phone) exists inline within src/index.js, mixed with unrelated logic.

Suggested Improvement

  • Create a new file: src/validators/phone.js
  • Move the validatePhoneNumber() function into that file
  • Export it as a named function: export function validatePhoneNumber(...)
  • Import it back into src/index.js and update its usage

Additional Context

No response

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions