Esempio n. 1
0
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())
}
Esempio n. 2
0
func (m *Topic) Validate(v *revel.Validation) {
	v.Check(m.UserId, revel.ValidRequired())
	v.Check(m.Content, revel.ValidRequired())
}
Esempio n. 3
0
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())
}
Esempio n. 4
0
func (m *TopicHasKeyword) Validate(v *revel.Validation) {
	v.Check(m.TopicId, revel.ValidRequired())
	v.Check(m.KeywordId, revel.ValidRequired())
}
Esempio n. 5
0
func (m *UserLoadedMaxTopic) Validate(v *revel.Validation) {
	v.Check(m.UserId, revel.ValidRequired())
	v.Check(m.MaxTopicId, revel.ValidRequired())
}
Esempio n. 6
0
func (m *Label) Validate(v *revel.Validation) {
	v.Check(m.Name, revel.ValidRequired())
}
Esempio n. 7
0
func (m *Notification) Validate(v *revel.Validation) {
	v.Check(m.NoticeTo, revel.ValidRequired())
	v.Check(m.Message, revel.ValidRequired())
}
Esempio n. 8
0
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())
}
Esempio n. 9
0
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))
}
Esempio n. 10
0
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())
}
Esempio n. 11
0
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())
}
Esempio n. 12
0
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())
}
Esempio n. 13
0
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())
}
Esempio n. 14
0
func (m *Session) Validate(v *revel.Validation) {
	v.Check(m.Session, revel.ValidRequired())
}
Esempio n. 15
0
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())
}