當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。