Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValidateValue to use string or interface? #20

Open
tferracina opened this issue Oct 10, 2024 · 1 comment
Open

ValidateValue to use string or interface? #20

tferracina opened this issue Oct 10, 2024 · 1 comment
Assignees
Labels
future Feature that will be required after more progress is made

Comments

@tferracina
Copy link
Collaborator

func (dt *Datatype) ValidateValue(value interface{}) bool { switch dt.ValueCheck { case "URL": return validateURL(value) case "in{1,2,3,4,5}": // TEMP return validateInRange(value, 1, 5) case "mail_ping": return validateEmail(value) case "phone": return validatePhone(value) case "file_exists": return validateFileExists(value) case "date": return validateDate(value) default: return false } }

@tferracina tferracina added the future Feature that will be required after more progress is made label Oct 10, 2024
@tebe-nigrelli
Copy link
Collaborator

We should struct because we can combine metadata and methods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
future Feature that will be required after more progress is made
Projects
None yet
Development

No branches or pull requests

2 participants