costumValidation

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Costum validator for json request

Index

Constants

This section is empty.

Variables

View Source
var BookableDate validator.Func = func(fl validator.FieldLevel) bool {
	date, ok := fl.Field().Interface().(time.Time)
	if ok {
		today := time.Now()
		if today.After(date) {
			return false
		}
	}
	return true
}
View Source
var IsCurrency validator.Func = func(fl validator.FieldLevel) bool {

	currency, ok := fl.Field().Interface().(string)
	if ok && util.CheckCurrencySupport(currency) {

		return true

	}
	return false
}

Currency check

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL