The $ Does Not Convert Text To Code What Should I Do?

30 Views Asked by At

The $ Does Not Convert Text To Code What Should I Do?

if(this.rules.min && this.value.length < this.rules.min){
    return 'Minimum length is ${this.rules.min}'
  }

enter image description here

1

There are 1 best solutions below

1
Patfreeze On BEST ANSWER

As Bulent says you need to use backticks quote like that :

if(this.rules.min && this.value.length < this.rules.min){
  return `Minimum length is ${this.rules.min}`
}