Regex Property in PathField


hi lads

 

i creating multifield contains pathfield. setting properties pathfield. when setting regex property pathfield getting following error on console. here code. please me identify doing wrong.

 

// picture url

                        this.add(new cq.ext.form.label( {

                            cls : "customwidget-label",

                            text : ""

                        }));

                        this.bannerimageurl = new cq.form.pathfield( {

                            cls : "customwidget-1",

                            fieldlabel : "picture link: ",

                            editable:false,

                            allowblank : false,

                            anchor: '75%',

                            rootpath :"/etc/designs/aib/business/images",

                            regex :"/(\.|\/)(gif|jpeg|jpg|png)$/i",

                            maxlength : 100,

                            listeners : {

                                change : {

                                    scope : this,

                                    fn : this.updatehidden

 

                                },

                                dialogclose : {

                                    scope : this,

                                    fn : this.updatehidden

 

                                }

                            }

                        });

                        this.add(this.bannerimageurl);

 

 

error getting on console

 

typeerror: this.regex.test not function

 

if (this.regex && !this.regex.test(value)) {

 

thanks in advance

 

cheers

kirthi

hi kirthi,

 

are doing below condition check somewhere in code?

if (this.regex && !this.regex.test(value)) {

also plz provide more detail seems doing custom work well.

 

thanks,

pawan



More discussions in Archived Spaces


adobe

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account