add coma to numbers : I have an input field, by Javascript, I'm allowing the user to enter only number in that input by ( I'm using React):

      validateValue(e) {
      return (
        e.target.value = e.target.value.replace(/[^0-9,.]/, '')
      );
    }

working great.

however I would like to add a coma every numbers entered in that function.

How is this possible to be achieve ?

Many thanks !