Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 829 Bytes

README.md

File metadata and controls

44 lines (30 loc) · 829 Bytes

Gos

Build Status

Usage

  • Download to your project:
go get github.com/wuriyanto48/gos
package main

import(
	"fmt"
	"github.com/wuriyanto48/gos"
)

func main() {
	g := gos.New(`\%$()}&"':`, true, true, true)
	input := `&:wuriyanto0 alex`
	err := g.Validate(input)
	if err != nil {
		fmt.Println("DO SOMETHING WITH ERROR")	
	}
	
}

What is that ?

g := gos.New(`\%$()}&"':`, true, true, true)
  • First Parameter \%$()}&"': : Allowed input to your string
  • Second Parameter boolean : Allow empty to your string, which mean your input can be empty ("")
  • Third Parameter boolean : Allow Number to your string
  • Fourth Parameter boolean : Allow Alpabetical to your string