Documentation
¶
Index ¶
- func Alpha(s string) (bool, error)
- func AlphaNumeric(s string) (bool, error)
- func CustomValidate(val string, rule string) (bool, error)
- func Date(s string) (bool, error)
- func Email(s string) (bool, error)
- func Length(s int, min, max int) (bool, error)
- func Numeric(s string) (bool, error)
- func PhoneNumber(s string) (bool, error)
- func RuneLength(s string, min, max int) (bool, error)
- func Times(s string) (bool, error)
- type StructVals
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Alpha ¶
Alpha validate string contains letters only [a-zA-Z] this function return bool and error if value does not valid
func AlphaNumeric ¶
AlphaNumeric validate string contains letters and number only [a-zA-Z0-9] this function return bool and error if value does not valid
func CustomValidate ¶
CustomValidate is validate data value with custom rule, your can write your regexp custom rule
func Date ¶
Date checking string format as date like mm-dd-yyyy or mm/dd/yyyy this function return bool and error if value does not valid
func Email ¶
Email validate string if is valid email format, this function return bool and error if value does not valid
func Numeric ¶
Numeric validate string contains digits only [0-9] this function return bool and error if value does not valid
func PhoneNumber ¶
PhoneNumber checking string match phone number like +62828882888 or 082323333333 this function return bool and error if value does not valid
func RuneLength ¶
RuneLength is validate text length
Types ¶
type StructVals ¶
type StructVals struct {
// contains filtered or unexported fields
}