[Freeipa-devel] [PATCH] 143 Entitlement quantity validation.

Adam Young ayoung at redhat.com
Wed Apr 27 01:23:01 UTC 2011


On 04/26/2011 05:48 PM, Endi Sukma Dewata wrote:
> The widget base class has been modified to validate integer value
> if the type is specified in the metadata. This is used to validate
> entitlement quantity.
>
>
> _______________________________________________
> Freeipa-devel mailing list
> Freeipa-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/freeipa-devel

Logic looks good.  I'd like to make the validator an external object, 
and have the builder select the validator based on the metadata.

The IPA data types beyond String and int are:

bool, float, bytes, and enum.  We should at least plan for them, even if 
we are not implementing them now:

something like

var validators = {
     int:  function (blah){...}
     string: function (regex){....}
}

widget.spec. validator = validators[type];


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110426/d615b035/attachment.htm>


More information about the Freeipa-devel mailing list