Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

ValidWhen Error for field ' bcprice' - line 1:17: unexpected token: )

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi:

I ran the following code in validation.xml:
<field property="bcprice" depends="validwhen">
<arg0 key="label.bcprice"/>
<var>
<var-name>test</var-name>
<var-value>((*this* >= 100))</var-value>
</var>
</field>

and I get the following error message:
ValidWhen Error for field ' bcprice' - line 1:17: unexpected token: )

I entered the value 2.5 in the field bcprice it should give me an error message about it should be from 100 to 99999.999 but instead I get the error:
ValidWhen Error for field ' bcprice' - line 1:17: unexpected token: )


Any help would be greatly appreciated.

Yours,

Frustated.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is kind of a head-scratcher. I'm not sure why it's happening either.

However, a validWhen isn't really the best way to do this anyway. I'd suggest using floatRange. Example:
 
    Bookmark Topic Watch Topic
  • New Topic