Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Urgent how to trim the spaces that in the text fileds?

$
0
0

Hi ,

 

I have an email field .If a  person enter the value in to the field along with space i need to validate that field by removing spaces.

I already have validation for this email field as shown below..

 

function isEmailValid(fld){

                    var result = true;

                    if(fld != null){

                              var r = new RegExp();

                        r.compile("^[a-z0-9_\\-\\.\\']+\\@[a-z0-9_\\-\\.]+\\.[a-z]{2,4}$","i" );

                              result = r.test(fld.rawValue);

                    }

                    return result;

          }

 

suggest the best how i will do that

 

Thanks in advance

Bharathi


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>