Avatar

Level 10

The first section of the code will do a trim on the field's rawValue..

Then it checks for emptyness ("").

Based on your question you are not sure whether the user has entered a value in it/ one space/ two spaces/ three spaces etc..So if you trim the field value, then all the spaces will be removed and then you can check the field's rawValue.

Hope this helps.

Thanks

Srini