The general concept is that annotations will be used to decorate the model with constraint definitions. For example:
public class MyModel { [Required] [ConstrainLength( minLength=1, maxLength=100 )] public var aString: String; [ConstrainRange( minValue=-123.4, maxValue=234.5 )] public var aNumber: Number; }The intention from here is that there will be functionality for automated validator generation and API-based constraint checking. Stay tuned for more.
No comments:
Post a Comment