Skip to content

purwokertodev/gos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published

Languages