# Perspective Numeric Entry invalidStyle class is not applying

**URL:** <https://forum.inductiveautomation.com/t/perspective-numeric-entry-invalidstyle-class-is-not-applying/102369>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 14, 2025, 2:25pm UTC](https://forum.inductiveautomation.com/t/perspective-numeric-entry-invalidstyle-class-is-not-applying/102369 "2025-02-14T14:25:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Stilson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/brian_stilson/32/73410_2.png) [@Brian\_Stilson](https://forum.inductiveautomation.com/u/Brian_Stilson)\
**Post date:** [February 14, 2025, 2:25pm UTC](https://forum.inductiveautomation.com/t/perspective-numeric-entry-invalidstyle-class-is-not-applying/102369/1 "2025-02-14T14:25:13Z")

</div>

UPDATE: I got it working by changing my background color state to "var(--error)" instead of just "--error". I'm still having difficulty understanding why just "--error" worked fine yesterday but now it doesn't.

I know there's another topic about this, but my situation is different in that this WAS working yesterday. I had no issues. Then today, all of the sudden, with no changes to my project, it doesn't work anymore.

I have a numeric entry template in my project. Here's the setup:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/9/f964fb1f2e7d9c7fc0b2b525edf51640d0f8a1e6.png)

Under the "invalidStyle" property, I'm pointing "classes" to "Text/invalidNumericEntry" which is a valid path. I was able to de-select and re-select it in the drop-down.

The style pretty much just flashes the background red a few times and then has it stay red:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/a/fa2c4d888981304862fbc6dd789ed05b19185195.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/9/a98bfac11d7740b138b7d1ca6d3ec8bbd188dfc6.png)

And this WAS working yesterday:  
 ![invalid entry](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/d/4dca3171ad18c254efb7b85d47eec0aab293645a.gif)

Today it's not:  
 ![invalid entry not working](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/2/b2fb56abd52ded94a3447f6972a7d2e8cac8a1e5.gif)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [February 14, 2025, 3:42pm UTC](https://forum.inductiveautomation.com/t/perspective-numeric-entry-invalidstyle-class-is-not-applying/102369/2 "2025-02-14T15:42:02Z")

</div>

Related: [Perspective Referencing CSS Variables changed?](https://forum.inductiveautomation.com/t/perspective-referencing-css-variables-changed/72618)

---

<div class="post-metadata">

**Author:** ![Brian\_Stilson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/brian_stilson/32/73410_2.png) [@Brian\_Stilson](https://forum.inductiveautomation.com/u/Brian_Stilson)\
**Post date:** [February 17, 2025, 3:58pm UTC](https://forum.inductiveautomation.com/t/perspective-numeric-entry-invalidstyle-class-is-not-applying/102369/3 "2025-02-17T15:58:18Z")

</div>

Makes sense. It's just weird my style class worked without wrapping it in var() one day but then randomly stopped working.
