src/scripts/script.js
//Check if all the fields were fulfilled
Check if all the fields were fulfilled
Check if all the fields were fulfilled
validateFields() {
    const { description, amount, date } = this.getInputData()
    if (description.trim() === "" ||
      amount.trim() === "" ||
      date.trim() === "") {
      throw new Error("Por favor, preencha todos os campos")
    }
  }
validateFields ( ) { const { description , amount , date } = this . getInputData ( ) if ( description . trim ( ) === "" || amount . trim ( ) === "" || date . trim ( ) === "" ) { throw new Error ( "Por favor, preencha todos os campos" ) } }
Check if all the fields were fulfilled
Check if all the fields were fulfilled