当前位置: 首页>>代码示例>>Golang>>正文


Golang revel.Validation类代码示例

本文整理汇总了Golang中git/masontest/com/branches/goserver/workers/revel.Validation的典型用法代码示例。如果您正苦于以下问题:Golang Validation类的具体用法?Golang Validation怎么用?Golang Validation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Validation类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: Validate

func (m *Attach) Validate(v *revel.Validation) {
	v.Check(m.Size, revel.ValidRequired())
	v.Check(m.Extention, revel.ValidRequired())
	v.Check(m.Name, revel.ValidRequired())
	// v.Check(m.Md5, revel.ValidRequired())
	v.Check(m.SavePath, revel.ValidRequired())
	v.Check(m.SaveName, revel.ValidRequired())
}
开发者ID:nangong92t,项目名称:go_src,代码行数:8,代码来源:attach.go

示例2: Validate

func (m *Topic) Validate(v *revel.Validation) {
	v.Check(m.UserId, revel.ValidRequired())
	v.Check(m.Content, revel.ValidRequired())
}
开发者ID:nangong92t,项目名称:go_src,代码行数:4,代码来源:topic.go

示例3: Validate

func (m *Like) Validate(v *revel.Validation) {
	v.Check(m.UserId, revel.ValidRequired())
	v.Check(m.Type, revel.ValidRequired())
	v.Check(m.TypeId, revel.ValidRequired())
}
开发者ID:nangong92t,项目名称:go_src,代码行数:5,代码来源:like.go

示例4: Validate

func (m *TopicHasKeyword) Validate(v *revel.Validation) {
	v.Check(m.TopicId, revel.ValidRequired())
	v.Check(m.KeywordId, revel.ValidRequired())
}
开发者ID:nangong92t,项目名称:go_src,代码行数:4,代码来源:topic_keyword.go

示例5: Validate

func (m *UserLoadedMaxTopic) Validate(v *revel.Validation) {
	v.Check(m.UserId, revel.ValidRequired())
	v.Check(m.MaxTopicId, revel.ValidRequired())
}
开发者ID:nangong92t,项目名称:go_src,代码行数:4,代码来源:user_loaded_max_topic.go

示例6: Validate

func (m *Label) Validate(v *revel.Validation) {
	v.Check(m.Name, revel.ValidRequired())
}
开发者ID:nangong92t,项目名称:go_src,代码行数:3,代码来源:label.go

示例7: Validate

func (m *Notification) Validate(v *revel.Validation) {
	v.Check(m.NoticeTo, revel.ValidRequired())
	v.Check(m.Message, revel.ValidRequired())
}
开发者ID:nangong92t,项目名称:go_src,代码行数:4,代码来源:notification.go

示例8: Validate

func (m *Subscribe) Validate(v *revel.Validation) {
	v.Check(m.UserId, revel.ValidRequired())
	v.Check(m.Type, revel.ValidRequired())
	v.Check(m.TypeId, revel.ValidRequired())
	v.Check(m.Created, revel.ValidRequired())
}
开发者ID:nangong92t,项目名称:go_src,代码行数:6,代码来源:subscribe.go

示例9: Validate

func (m *User) Validate(v *revel.Validation) {
	v.Check(m.Username, revel.ValidRequired(), revel.ValidMaxSize(25))
	v.Check(m.Password, revel.ValidRequired(), revel.ValidMinSize(6))
}
开发者ID:nangong92t,项目名称:go_src,代码行数:4,代码来源:user.go

示例10: Validate

func (m *UserBlocked) Validate(v *revel.Validation) {
	v.Check(m.UserId, revel.ValidRequired())
	v.Check(m.Blocked, revel.ValidRequired())
	v.Check(m.Created, revel.ValidRequired())
}
开发者ID:nangong92t,项目名称:go_src,代码行数:5,代码来源:user_blocked.go

示例11: Validate

func (m *Comment) Validate(v *revel.Validation) {
	v.Check(m.TopicId, revel.ValidRequired())
	v.Check(m.Creator, revel.ValidRequired())
	v.Check(m.Content, revel.ValidRequired())
}
开发者ID:nangong92t,项目名称:go_src,代码行数:5,代码来源:comment.go

示例12: Validate

func (m *Profile) Validate(v *revel.Validation) {
	v.Check(m.Id, revel.ValidRequired())
	v.Check(m.Gender, revel.ValidRequired())
	v.Check(m.Age, revel.ValidRequired())
	v.Check(m.Lllness, revel.ValidRequired())
}
开发者ID:nangong92t,项目名称:go_src,代码行数:6,代码来源:profile.go

示例13: Validate

func (m *UserLikeKeywordRate) Validate(v *revel.Validation) {
	v.Check(m.UserId, revel.ValidRequired())
	v.Check(m.KeywordId, revel.ValidRequired())
	v.Check(m.Rate, revel.ValidRequired())
}
开发者ID:nangong92t,项目名称:go_src,代码行数:5,代码来源:user_like_keyword_rate.go

示例14: Validate

func (m *Session) Validate(v *revel.Validation) {
	v.Check(m.Session, revel.ValidRequired())
}
开发者ID:nangong92t,项目名称:go_src,代码行数:3,代码来源:session.go

示例15: Validate

func (m *UnwantWord) Validate(v *revel.Validation) {
	v.Check(m.Word, revel.ValidRequired())
	v.Check(m.Creator, revel.ValidRequired())
	v.Check(m.Created, revel.ValidRequired())
}
开发者ID:nangong92t,项目名称:go_src,代码行数:5,代码来源:unwantword.go


注:本文中的git/masontest/com/branches/goserver/workers/revel.Validation类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。