问题描述:

I would like to create a validation for my model:

 [Required]

[DataType(DataType.Time)]

public TimeSpan? time_start { get; set; }

[Required]

[DataType(DataType.Time)]

public TimeSpan? time_end { get; set; }

[Required]

[DataType(DataType.Time)]

public TimeSpan? time_break { get; set; }

if time_end - time_start is greater than 6 hours, then the time_break must be grater than one hour.

this validatino shoud be client and server side.

Is that possible with Foolproof validation.

相关阅读:
Top