Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PhoneRX = regexp.MustCompile("(^\\+[0-9]{2}|^\\+[0-9]{2}\\(0\\)|^\\(\\+[0-9]{2}\\)\\(0\\)|^00[0-9]{2}|^0)([0-9]{9}$|[0-9\\-\\s]{10}$)")
PhoneRX represents phone number maching pattern
Functions ¶
This section is empty.
Types ¶
type Input ¶
type Input struct { Values url.Values VErrors ValidationErrors CSRF string }
Input represents form input values and validations
func (*Input) MatchesPattern ¶
MatchesPattern checks if a given input form field matchs a given pattern
func (*Input) PasswordMatches ¶
PasswordMatches checks if Password and Confirm Password fields match
type ValidationErrors ¶
ValidationErrors represents input validation errors
func (ValidationErrors) Add ¶
func (ve ValidationErrors) Add(field, message string)
Add method to add error messages for a given field to the map
func (ValidationErrors) Get ¶
func (ve ValidationErrors) Get(field string) string
Get method to retrieve the first error message for a given// field from the map.
Click to show internal directories.
Click to hide internal directories.