Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IsEmpty
Message
De
04/03/2010 17:36:42
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
04/03/2010 17:30:39
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Divers
Thread ID:
01452408
Message ID:
01452643
Vues:
47
>I just tried both cases in the rules class and both do not catch that the field is actually empty.
>
>if (mmType.IsEmpty(first_Name, true))
>
>if (mmType.IsEmpty(first_Name, false))
>
>All I do is bring up the form, choose, in my case, a Project, then go to the Properties page and in a Required field I select the existing letters WFBCI and delete them, not knowing this is a 10 character field and there are still 5 spaces remaining. I then click the Save button and the changes save with the blank field. I put in the .trim() and the rule catches the above and indicates it is a required field.
>
>if (mmType.IsEmpty(first_Name.trim()))

OK, I got it. I will run through that and see what is happening. I take it your field is a set length rather than Varchar type and it causes the whole length to have data even if padded with space. I would have expected the method to catch the spaces and take those off before saving it.
Tim
Timothy Bryan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform