title: jQuery - asp.net mvc- Field is not accepting more than one comma in a sequence of numbers -float numbers
body: <p>For example, if I enter 5,000, the system recognizes as 5,00</p>
  
  <p>Another problem that happens is that if I type, for example 5,100 the system recognizes as null and saves the value as 0.00</p>
  
  <p>I tried everything to understand the problem, but I couldn't</p>
  
  <p>How would I get fields to recognize values entered with commas or dots?</p>
  
  <p>My code:</p>
  
  <pre><code>public class EstoqueDaEmbarcacao : Entity
  {
      public decimal AguaCarregada { get; set; }
  
      public decimal DieselCarregado { get; set; }
  }
  </code></pre>
  
  <p>jQuery</p>
  
  <pre><code>function fillInventoryData(barcoId) {
      $("#estoque-barco-id").val(barcoId);
      $("#estoque-barco-nome").val($("#selectEmbarcacao option:selected").text());
      $("#modal-estoque").modal('show');
  }
  function saveInventory() {
      $("#message-estoque").removeClass("alert-danger");
      $("#message-estoque").removeClass("alert-warning");
      var barcoId = $("#estoque-barco-id").val();
      var agua = $("#estoque-barco-agua").val().replace(",", ".");
      var diesel = $("#estoque-barco-diesel").val().replace(",", ".");
      var data = JSON.stringify({ AguaCarregada: agua, DieselCarregado: diesel, BarcoId: barcoId });
      if (agua == "" || diesel == "") {
          $("#message-estoque").addClass("alert-warning");
          $("#message-estoque").html("Fill in all fields to continue");
          return;
      }
      $.ajax({
          url: "/InfoApontamento/AtualizarEstoqueBarco",
          type: "POST",
          dataType: "json",
          data: data,
          contentType: "application/json",
          success: function (result) {
  
              if (!result.Success) {
  
                  $("#message-estoque").html(result.ErrorDatail);
                  $("#message-estoque").addClass("alert-danger");
              }
              else if (!result.Data) {
                  $("#message-estoque").html(result.Message);
                  $("#message-estoque").addClass("alert-danger");
              }
              else {
                  alert("Salvo com sucesso!");
                  $("#modal-estoque").modal('hide');
                  $('#estoque-barco-agua').val("");
                  $('#estoque-barco-diesel').val("");
                  // abrirModalManutencao();
                  preInicializarModal();
              }
          }
      });
  
  }
  </code></pre>
  
  <p>Page:</p>
  
  <pre><code>&lt;div class="form-row"&gt;
                      &lt;div class="col"&gt;
                          &lt;label for="embarcacaoInput"&gt;Água&lt;/label&gt;
                          &lt;input type="number" step="0.01" class="form-control" id="estoque-barco-agua"&gt;
                      &lt;/div&gt;
                      &lt;div class="col"&gt;
                          &lt;label for="embarcacaoInput"&gt;Diesel&lt;/label&gt;
                          &lt;input type="number" step="0.01" class="form-control" id="estoque-barco-diesel"&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
  </code></pre>