Skip to content
#

macaron

Here are 31 public repositories matching this topic...

toni-moreno
toni-moreno commented Apr 22, 2017

The custom validation on the example is not working.

func init() {
	// Min(1) set de minimun integer value
	binding.AddRule(&binding.Rule{
		IsMatch: func(rule string) bool {
			return strings.HasPrefix(rule, "Min(")
		},
		IsValid: func(errs binding.Errors, name string, v interface{}) (bool, binding.Errors) {
			num, ok := v.(int)
			if !ok {
				return false, errs
			}

Improve this page

Add a description, image, and links to the macaron topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the macaron topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.