Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IsEmpty
Message
From
04/03/2010 14:02:29
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Miscellaneous
Thread ID:
01452408
Message ID:
01452571
Views:
30
OK, here is the difference.

If you select AllowEmptyValue you get this line in the rule
if (mmType.IsEmpty(first_Name, true))
if you do not select AllowEmpty but the field is required you get this line
if (mmType.IsEmpty(last_Name))
I would have to look in the mm code to see the implementation but I would be the "true" on the end translates to allow empty strings or spaces.

Which also means you could easily examine your rules methods and add or take that out as you wish.
Tim


>Johnny,
>
>I tried to test what you are experiencing here in my web app and noticed the following:
>
>I have a character field that requires a value and I entered a space in the field and attempted to save but in the rules object a null was still being passed even though I blanked out the field on the form. This means something is going on between the interface and business object (which sounds like a Trim() is in fact taking place). Either way this works for me because I do not want a space or a null. But what if I wanted to allow spaces? I think that setting the allowEmptyValue to true still wouldn't work since the null value would still (probably) be passed to the object. I would then need to investigate why this is happening. Right now I do not have the need to do so.
>
>Test it a little to see what actually happens (if nobody else can give you an answer) and I think you will find out how this is really working.
>
Timothy Bryan
Previous
Reply
Map
View

Click here to load this message in the networking platform