Coder Social home page Coder Social logo

contact_form's Introduction

Contact form

Description/Descripción 📋

🇪🇸

Para cualquier tipo de app, es muy importante que haya un formulario de contacto con el que poder comunicarse con los usuarios, y por ello el reto de hoy.

🇺🇸

For any type of application, it is very important that there is a contact form with which to communicate with users, and therefore today's challenge.

image

How did I get to this solution to the challenge? / ¿Como llegue a esta solución del reto? 🤷🏻

🇺🇸

An MVVM pattern and retrofit to get the list of countries from the RESTCountries API (https://restcountries.eu/) and a function which validates the phone and email fields. Organize your files with a clean architecture.

🇪🇸

Utilice un patrón MVVM y retrofit para obtener la lista de países de la API RESTCountries(https://restcountries.eu/) y una función la cual valida los campos de teléfono y correo electrónico. Organice los ficheros con una clean arquitecture.

Task/Tareas 🎯

🇪🇸 ✅ Task 1 → Puedo ver el diseño propuesto por pantalla

🇺🇸 ✅ Task 1 → I can see the proposed design on the screen

image

🇪🇸 ✅ Task 2 → Los campos de teléfono y correo tiene manejo de errores y no permite enviar el formulario sin que sean correctos

🇺🇸 ✅ Task 2 → The phone and mail fields have error handling and do not allow submitting the form without being correct

  • Validator.kt

  • MainActivity.kt

       binding.vbAccept.setOnClickListener {
          if (!Validator.validText(1, binding.etEmail.text.toString()))
              binding.etEmail.error = getString(R.string.email_invalid)
          else if (!Validator.validText(2, binding.etPhone.text.toString()))
              binding.etPhone.error = getString(R.string.phone_invalid)
          else {
              val snackBar = Snackbar.make(
                  binding.clMain, getString(R.string.validField),
                  Snackbar.LENGTH_LONG
              ).setAction("Action", null)
              snackBar.show()
          }
      }
    

image image image

🇪🇸 ✅ Task 3 → Puedo ver como mínimo una lista de 10 países

🇺🇸 ✅ Task 3 → I can see at least a list of 10 countries

🇪🇸 ✅ Task 4 → Puedo ver una lista de países completa integrando la API de países RESTCountries(https://restcountries.eu/)

🇺🇸 ✅ Task 4 → I can see a complete list of countries by integrating the RESTCountries countries API (https://restcountries.eu/)

image

Created by🧑🏻‍💻

  • Victor Escalante

Licence 📝

contact_form's People

Contributors

va3mezk avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.