This pull request introduces a new method for email validation using Go's net/mail package, specifically the ParseAddress function. It also adds flexibility in choosing the validation method for email fields in the Rules struct.
Summary
Added a new function validateEmail in defaults/email.go to validate email addresses using mail.ParseAddress.
Modified defaults/rules.go to include:
A new boolean flag UseRegexValidation to choose between regex-based validation and ParseAddress validation for emails.
A custom validation function option ValidationFunction for additional validation flexibility.
Updated the Errors method to support the new email validation logic and custom validation functions.
These changes allow more robust and flexible validation configurations for user inputs, particularly email addresses.
Fixes #1.
🎉 Latest improvements to Sweep:
New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
Description
This pull request introduces a new method for email validation using Go's
net/mail
package, specifically theParseAddress
function. It also adds flexibility in choosing the validation method for email fields in theRules
struct.Summary
validateEmail
indefaults/email.go
to validate email addresses usingmail.ParseAddress
.defaults/rules.go
to include:UseRegexValidation
to choose between regex-based validation andParseAddress
validation for emails.ValidationFunction
for additional validation flexibility.Errors
method to support the new email validation logic and custom validation functions.Fixes #1.
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can:
This is an automated message generated by Sweep AI.