Hi there,
Trying to make use of the wrappers to speed things up, but I cant find a way to add "required" to a field, since the modelbinding doesn't care about the [Required] attribute on the property.
In javascript this seems easy:
Also, I read that servervalidation were supposed to be implemented in q3-release, but I can't get it to work.
Regards,
Pär Sandgren
Trying to make use of the wrappers to speed things up, but I cant find a way to add "required" to a field, since the modelbinding doesn't care about the [Required] attribute on the property.
public
class
TaskItem : ISchedulerEvent
{
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public
int
TaskItemID {
get
;
set
; }
[Required]
public
string
Title {
get
;
set
; }
public
string
Description {
get
;
set
; }
[Required]
public
DateTime Start {
get
;
set
; }
public
string
StartTimezone {
get
;
set
; }
[Required]
public
DateTime End {
get
;
set
; }
public
string
EndTimezone {
get
;
set
; }
public
string
RecurrenceRule {
get
;
set
; }
public
int
? RecurrenceID {
get
;
set
; }
public
string
RecurrenceException {
get
;
set
; }
public
bool
IsAllDay {
get
;
set
; }
public
int
? OwnerID {
get
;
set
; }
}
schema: {
model: {
id:
"taskID"
,
fields: {
taskID: { from:
"TaskID"
, type:
"number"
},
title: { from:
"Title"
, validation: { required:
true
} }
}
}
}
Regards,
Pär Sandgren