diff --git a/internal/checker/default/float/main.go b/internal/checker/default/float/main.go new file mode 100644 index 0000000..3b272e8 --- /dev/null +++ b/internal/checker/default/float/main.go @@ -0,0 +1,24 @@ +package main + +import ( + "git.xdrm.io/go/aicra/driver" +) + +func main() {} +func Export() driver.Checker { return new(FloatChecker) } + +type FloatChecker int + +// Match matches the string 'int' +func (fck FloatChecker) Match(name string) bool { + return name == "float" +} + +// Check returns true for any type from the @validationTable +func (fck FloatChecker) Check(value interface{}) bool { + + // check if float (default wrapping type) + _, ok := value.(float64) + return ok + +}