Implements email format validation for the Person model and adds a corresponding unit test.
Adds a validation in the Person model to ensure the email attribute conforms to a valid email format using URI::MailTo::EMAIL_REGEXP.
Introduces a new unit test in person_test.rb to verify that a Person instance with an invalid email format is not considered valid and cannot be saved to the database.
@anandvc this entire PR was written by the new copilot workspace! It's definitely a simple task, but I assigned it an issue (with a detailed description) and it did the implementation and tee'd up the PR.
Implements email format validation for the
Person
model and adds a corresponding unit test.Person
model to ensure the email attribute conforms to a valid email format usingURI::MailTo::EMAIL_REGEXP
.person_test.rb
to verify that aPerson
instance with an invalid email format is not considered valid and cannot be saved to the database.For more details, open the Copilot Workspace session.