oninput="if(this.value.length == 2){this.value = this.value.replace(/\b(0+)/gi,'')}else{this.value = this.value.replace(/\D/g,'') > 500 ? 500 : this.value.replace(/\D/g,'') < 0 ? 0 : this.value.replace(/\D/g,'')};"
^(500|([1-4]\d{2}|\d|\d{2})(\.\d+)?)$
^(500|[1-4]\d{2}|\d{2}|\d)$