rule

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2021 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DateMustBeAfterError = ValidationError.Wrap("the :attribute must be after :date, :input given")
View Source
var DateMustBeAfterOrEqualError = ValidationError.Wrap("the :attribute must be after or equal to :date, :input given")
View Source
var DateMustBeBeforeError = ValidationError.Wrap("the :attribute must be before :date, :input given")
View Source
var DateMustBeBeforeOrEqualError = ValidationError.Wrap("the :attribute must be before or equal to :date, :input given")
View Source
var DateMustBeEqualError = ValidationError.Wrap("the :attribute must be equal to :date, :input given")
View Source
var DateNotValidFormatError = ValidationError.Wrap("the :attribute is not a valid date (example :example), :input given")
View Source
var IsRequiredError = ValidationError.Wrap("the :attribute is required")
View Source
var MayNotBeGreaterThanError = ValidationError.Wrap("the :attribute may not be greater than :expect, :input given")
View Source
var MayNotHaveMoreThanItemsError = ValidationError.Wrap("the :attribute may not have more than :expect items, :input items given")
View Source
var MuseBeABooleanError = ValidationError.Wrap("the :attribute must be a boolean, :input given")
View Source
var MuseEndWithError = ValidationError.Wrap("the :attribute must end with :expect, :input given")
View Source
var MuseStartWithError = ValidationError.Wrap("the :attribute must start with :expect, :input given")
View Source
var MustBeAMapError = ValidationError.Wrap("the :attribute must be a map")
View Source
var MustBeASliceError = ValidationError.Wrap("the :attribute must be a slice")
View Source
var MustBeAStringError = ValidationError.Wrap("the :attribute must be a string")
View Source
var MustBeAcceptedError = ValidationError.Wrap("the :attribute must be accepted")
View Source
var MustBeAnIntegerError = ValidationError.Wrap("the :attribute must be an integer")
View Source
var MustBeAtLeastThanError = ValidationError.Wrap("the :attribute must be at least :expect, :input given")
View Source
var MustBeAtLeastThanItemsError = ValidationError.Wrap("the :attribute must be at least :expect items, :input items given")
View Source
var MustBeContainItemsError = ValidationError.Wrap("the :attribute must contain :expect items, :input items given")
View Source
var MustBeError = ValidationError.Wrap("the :attribute must be :expect, :input given")
View Source
var MustBePresentError = ValidationError.Wrap("the :attribute must be present")
View Source
var MustHaveAValueError = ValidationError.Wrap("the :attribute field must have a value")
View Source
var OptionDateIsRequiredError = errors.New("option Date is required")

System Error

View Source
var OptionWithIsRequiredError = errors.New("option With is required")
View Source
var SelectedIsInvalidError = ValidationError.Wrap("the selected :attribute is invalid")
View Source
var ValidationError = errors.New("").Status(net.StatusUnprocessableEntity).Level(log_level.INFO)

Validation Error

Functions

This section is empty.

Types

type Accepted

type Accepted struct{}

func (Accepted) Requirements

func (a Accepted) Requirements() []inter.Rule

func (Accepted) Verify

func (a Accepted) Verify(value support.Value) error

type After

type After struct {
	Date     *carbon.Carbon
	Format   string
	TimeZone string
}

func (After) Verify

func (a After) Verify(value support.Value) error

type AfterOrEqual

type AfterOrEqual struct {
	Date     *carbon.Carbon
	Format   string
	TimeZone string
}

func (AfterOrEqual) Verify

func (a AfterOrEqual) Verify(value support.Value) error

type Before

type Before struct {
	Date     *carbon.Carbon
	Format   string
	TimeZone string
}

func (Before) Verify

func (b Before) Verify(value support.Value) error

type BeforeOrEqual

type BeforeOrEqual struct {
	Date     *carbon.Carbon
	Format   string
	TimeZone string
}

func (BeforeOrEqual) Verify

func (b BeforeOrEqual) Verify(value support.Value) error

type Boolean

type Boolean struct{}

func (Boolean) Verify

func (b Boolean) Verify(value support.Value) error

type Date

type Date struct {
	Format string
}

func (Date) Verify

func (d Date) Verify(value support.Value) error

type DateEqual

type DateEqual struct {
	Date     *carbon.Carbon
	Format   string
	TimeZone string
}

func (DateEqual) Verify

func (b DateEqual) Verify(value support.Value) error

type Ends

type Ends struct {
	// contains filtered or unexported fields
}

func (Ends) Verify

func (e Ends) Verify(value support.Value) error

func (Ends) With

func (e Ends) With(with ...string) Ends

type Filled

type Filled struct{}

func (Filled) Verify

func (f Filled) Verify(value support.Value) error

type In

type In struct {
	// contains filtered or unexported fields
}

func (In) Verify

func (i In) Verify(value support.Value) error

func (In) With

func (i In) With(with ...interface{}) In

type Integer

type Integer struct{}

func (Integer) Verify

func (i Integer) Verify(value support.Value) error

type IntegerAble

type IntegerAble struct{}

func (IntegerAble) Verify

func (i IntegerAble) Verify(value support.Value) error

type Map

type Map struct{}

func (Map) Verify

func (m Map) Verify(value support.Value) error

type Max

type Max struct {
	Len int
}

func (Max) Verify

func (m Max) Verify(value support.Value) error

type Min

type Min struct {
	Len int
}

func (Min) Verify

func (m Min) Verify(value support.Value) error

type Present

type Present struct{}

func (Present) Requirements

func (p Present) Requirements() []inter.Rule

func (Present) Verify

func (p Present) Verify(support.Value) error

type Required

type Required struct{}

func (Required) Requirements

func (r Required) Requirements() []inter.Rule

func (Required) Verify

func (r Required) Verify(value support.Value) error

type Size

type Size struct {
	Len int
}

func (Size) Verify

func (s Size) Verify(value support.Value) error

type Slice

type Slice struct{}

func (Slice) Verify

func (s Slice) Verify(value support.Value) error

type Start

type Start struct {
	// contains filtered or unexported fields
}

func (Start) Verify

func (e Start) Verify(value support.Value) error

func (Start) With

func (e Start) With(with ...string) Start

type String

type String struct{}

func (String) Verify

func (s String) Verify(value support.Value) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL