lot of new functionalities

This commit is contained in:
Arnaud Delcasse
2025-10-14 18:11:13 +02:00
parent a6f70a6e85
commit d992a7984f
164 changed files with 15113 additions and 9442 deletions

View File

@@ -0,0 +1,15 @@
package formvalidators
import (
"regexp"
"github.com/go-playground/validator/v10"
)
const phoneNumberRegexStreing = "^((\\+)33|0)[1-9](\\d{2}){4}$"
var phoneNumberRegex = regexp.MustCompile(phoneNumberRegexStreing)
func PhoneNumber(fl validator.FieldLevel) bool {
return phoneNumberRegex.MatchString(fl.Field().String())
}