validacao de campo vazio Toastr js
//arquivo separados
let campos = [{value: this.date, label: "Data"}, {value: this.custo_valor, label: "Custo"}, {value: this.vei_id.id, label: "veículo"}, {value: this.tipo_id.id, label: "condutor"}, ]
if(this.util.validacao(campos))
//Serviço(utilities)
public validacao(campos)
{
let retorno = true;
campos.forEach((val, i)=>
{
if(!val.value)
{
this.toastr.warning("Preecha o campo " + val.label + "!");
retorno = false;
}
});
return retorno;
}
Also in JavaScript:
- how react with socket
- ajax open new tab with post
- node-lambda run error fs-extra\lib\mkdirs\make-dir.js } catch { Unexpected token
- boble sorting javascript
- concat array javascript
- in react js how to access history in component
- ternaire javascript
- js detect mobile
- jasmine spy return value when using create Spy Object angular 2
- Image react native
- js wait for time
- Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/json: dial unix /var/run/docker.sock: connect: permission denied
- fullcalendar reload events ajax
- angular size of array
- javascript add text to textarea overwrite
- jQuery AJAX form submit
- discord.js get all members with role
- material.preactjs type = date use
- Did you mean "@babel/transform-react-jsx-source"
- how to get time and date from iso string javascript
- request entity too large express
- math ceil floor
- _.get alternative
- shadow class angular