section-engineering-education / engineering-education

“Section's Engineering Education (EngEd) Program is dedicated to offering a unique quality community experience for computer science university students."
Apache License 2.0
364 stars 890 forks source link

[Android]How to add Realtime Form Validations in android Using Livedata, Viewmodel and Data Binding #5856

Closed manmusa100 closed 2 years ago

manmusa100 commented 2 years ago

NOTE: All 1st-time contributors should know Topic approval and PR submission does NOT guarantee your Topic/Article will be published. Our team of Peer Reviewers and Content Moderators will review all PRs that come in to make sure they adhere to the standard of quality we expect from the EngEd community.

We expect all community memebers to go through provided examples, resources, and previously published material before submitting content. As a rule of thumb, please only submit articles (pull requests) that are complete, formatted correctly, and include a fully polished article (ready to be published and error free).

All revisions and edits should be completed on your own forked repo (as to not take up room in the queue). Any PR that is submitted incomplete (meaning not ready to be published as is) will be closed. A PR being closed does NOT mean the article can not be published (or fixed) it simply means that the edits, revisions, and fixes will happen outside of the queue.

Topic Suggestion

Enter topic suggestion here...

Pre-submission advice

By following all our pre-submission advice and reviewing our Resources folder, you will maximise your chances of your topic being approved.

We ask that you please be patient as our team works through approving and publishing all articles/tutorials in a timely manner.

Allow 1-3 days for a topic to be reviewed and/or approved - allow 3-7 days for an articles to be reviewed and/or published (subject to vary depending on volume and/or backlog of articles).

Be sure to visit our Resources Page for tools, resources, and example articles that will help you propose and write a successful article.

Please ensure that you have only one open issue + linked pull request at a time. This will ensure that we complete the article in a timely manner from inception to publishing.)

We tend to stray away or tend not to publish reviews/comparisons of commercial product offerings.

Writing sample(s):

Include any links or writing samples - to help our team better gauge your writing quality.

Proposal Submission

Proposed title of article

Your title should be descriptive of the article/tutorial. Be Specific.

Use keyword research to improve your article's SEO.

Proposed article introduction

We're looking for the first 2-3 paragraphs of your article that appropriately summarize what your article will be about. We will use this writing snippet to help us assess the overall quality before approval so ensure it has been proofread, spellchecked and grammarchecked.

For example, if the article is based on machine learning, use the following: [Machine learning] Introduction to Machine Learning. If the article is based on developing an Android application, use the following: [Android] Developing Apps using Android.

Building an application that requires a user to submit information requires you to verify this data before they are sent into your application. This is where the concept of form validations comes in. When a user fills in an email the application must be able to check if the user has provided an email input. If not, update the user accordingly to fill in the right email format. There are many values and specific data that an application requires from a user. This guide aims to help you understand how to achieve such concepts using the android studio. This guide will use LiveData, View model, and Data Binding to help check the inputs in real-time.

Key takeaways

What are the 3-5 most important things the reader should understand or be able to do after reading this article? Use this area to get your ideas down on the bulk of your article or tutorial.

  1. What is Form Validations
  2. What is LiveData
  3. What is Data Binding
  4. Create a basic form in android
  5. Add form validations using XML
  6. Create a real-time check using LiveData, View model, and Data Binding
  7. Validate the user inputs.
  8. Android form validation libraries that you can use

Article quality

How is your article unique? Tell us what makes your approach different from similar articles that have published on the same topic? Is yours more in-depth? Does it cover additional topics? Do you provide handy tips or anecdotal advice?

References

Please list links to any published content/research that you intend to use to support/guide this article.

Conclusion

Finally, remove the Pre-Submission advice section and all our blockquoted notes as you fill in the form before you submit. We look forwarding to reviewing your topic suggestion.

Templates to use as guides

hectorkambow commented 2 years ago

Good afternoon and thank you for submitting your topic suggestion. Your topic form has been entered into our queue and should be reviewed (for approval) as soon as a content moderator is finished reviewing the ones in the queue before it. :rocket:

LinusMuema commented 2 years ago

Hi @manmusa100

Could you please expand upon how your content will differ from what is already available on this article? We lean towards content that offers an original viewpoint/approach around programming-centric topics.

manmusa100 commented 2 years ago

Hey @LinusMuema I can choose to use Binding Adapters and use Regex checks instead of using the Livedata.

LinusMuema commented 2 years ago

Hi @manmusa100 Make sure you capitalise on the unique areas of your article to make it original.

topic approved 🚀