func ValidateVersion(fl validator.FieldLevel) bool {
	version, ok := fl.Field().Interface().(string)
	if ok {
		if _, err := semver.Parse(version); err == nil {
			return true
		}
		return false
	}
	return false
}
ValidateVersion validates if version is semantic version compatible or not
package server
import (
	"github.com/blang/semver/v4"
	"github.com/gin-gonic/gin"
	"github.com/gin-gonic/gin/binding"
	"github.com/go-playground/validator/v10"
)