Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I wrote a library that extends EditText which supports natively some validation methods and is actually very flexible. </p> <p>Current, as I write, <strong>natively</strong> supported (through <strong>xml attributes</strong>) validation methods are:</p> <ol> <li><strong>regexp</strong>: for custom regexp</li> <li><strong>numeric</strong>: for an only numeric field</li> <li><strong>alpha</strong>: for an alpha only field</li> <li><strong>alphaNumeric</strong>: guess what?</li> <li><strong>email</strong>: checks that the field is a valid email</li> <li><strong>creditCard</strong>: checks that the field contains a valid credit card using Luhn Algorithm</li> <li><strong>phone</strong>: checks that the field contains a valid phone number</li> <li><strong>domainName</strong>: checks that field contains a valid domain name ( always passes the test in API Level &lt; 8 )</li> <li><strong>ipAddress</strong>: checks that the field contains a valid ip address webUrl: checks that the field contains a valid url ( always passes the test in API Level &lt; 8 )</li> <li><strong>nocheck</strong>: It does not check anything. (Default)</li> </ol> <p>You can check it out here: <a href="https://github.com/vekexasia/android-form-edittext" rel="noreferrer">https://github.com/vekexasia/android-form-edittext</a> </p> <p>Hope you enjoy it :)</p> <p>In the page I linked you'll be able to find also an example for email validation. I'll copy the relative snippet here:</p> <pre><code>&lt;com.andreabaccega.widget.FormEditText style="@android:style/Widget.EditText" whatever:test="email" android:id="@+id/et_email" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/hint_email" android:inputType="textEmailAddress" /&gt; </code></pre> <p>There is also a test app showcasing the library possibilities.</p> <p>This is a screenshot of the app validating the email field.</p> <p><img src="https://i.stack.imgur.com/KtLb1.jpg" alt="email validation done thorugh xml+library"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload