Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Ce dépôt a été archivé le 2022-05-07. Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
nyaa-pantsu/util/validator/validator.go
2017-06-29 21:20:52 +10:00

19 lignes
408 o
Go

package validator
import (
"reflect"
"strconv"
"github.com/asaskevich/govalidator"
"github.com/NyaaPantsu/nyaa/util/log"
msg "github.com/NyaaPantsu/nyaa/util/messages"
)
/
// ValidateForm : Check if a form is valid according to its tags
func ValidateForm(form interface{}, mes *msg.Messages) {
result, err := govalidator.ValidateStruct(form)
if err != nil {
println("error: " + err.Error())
}
}