0

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 Answers1

1

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}`
}
Patfreeze
  • 680
  • 6
  • 16
  • No problem, and you have a typo in you image `Requird` must be `Required` with a `ed`. Cancel my last, it seem to be valid also as it writen. So happy coding. :) – Patfreeze Nov 09 '21 at 21:27