英文:
Ajax validation for Go programs
问题
有没有一个支持 RESTful API 数据验证的 Go 包?
如果有类似于 Ruby 中的 active model 验证的东西就好了。
我尝试了各种方法,但找不到一个能很好地抽象这个需求的东西。
英文:
Is there a Go package that supports data validation for restful apis?
It would be good if there were something similar to active model validation in Ruby?
I tried various ways but couldn't find something that offers good abstration of this need.
答案1
得分: 0
go-validator 在内置验证器的基础上支持标签和自定义验证器。它可以轻松地添加到你的 API 资源的模型中。
英文:
go-validator has support for tags and custom validators on top of the built-in ones. It can easily be added to the models for your API resources.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论