{"id":313796,"date":"2020-11-25T21:01:20","date_gmt":"2020-11-25T21:01:20","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=313796"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=313796","title":{"rendered":"\u0412\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0444\u043e\u0440\u043c\u044b textInputLayout \u0432 Android \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<blockquote>\n<p>\u041f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0432 OTUS \u043e\u0442\u043a\u0440\u044b\u0442 \u043d\u0430\u0431\u043e\u0440 \u043d\u0430 <a href=\"https:\/\/otus.pw\/Plc2\/\">\u043d\u043e\u0432\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u043a\u0443\u0440\u0441\u0430 &#171;Android Developer. Basic&#187;<\/a>. \u0412 \u043f\u0440\u0435\u0434\u0434\u0432\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0440\u0442\u0430 \u043a\u0443\u0440\u0441\u0430 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u0434\u043b\u044f \u0432\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/otus.pw\/Plc2\/\">\u0434\u0435\u043d\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0434\u0432\u0435\u0440\u0435\u0439 \u043f\u043e \u043a\u0443\u0440\u0441\u0443, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0443\u0437\u043d\u0430\u0435\u0442\u0435 \u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b<\/a>.<\/p>\n<\/blockquote>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/761\/4af\/ec8\/7614afec84c471e58f218aa1d4910eb7\" width=\"780\" height=\"439\"><figcaption><\/figcaption><\/figure>\n<hr>\n<h3>\u0423\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0444\u043e\u0440\u043c<\/h3>\n<\/p>\n<p><em>\u00ab\u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0447\u0435\u043c\u0443-\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e, \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438\u00bb.<\/em><\/p>\n<p>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043d\u0435\u0439 \u043d\u0430\u0437\u0430\u0434 \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0430\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c, \u0433\u0434\u0435 \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0444\u043e\u0440\u043c\u044b <code>textInputLayout<\/code> \u0438 <code>textInputEditText<\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443.<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432 \u044f \u0434\u043e\u0431\u0438\u043b\u0441\u044f \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430, \u0438\u0437\u0443\u0447\u0438\u0432 \u043a\u043e\u0435-\u043a\u0430\u043a\u0438\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u0438 \u043f\u0440\u043e\u0432\u0435\u0434\u044f \u0440\u044f\u0434 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432. \u0412\u043e\u0442 \u0447\u0442\u043e \u044f \u0445\u043e\u0442\u0435\u043b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c:<\/p>\n<p>&nbsp;<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ea0\/c25\/50a\/ea0c2550a2cbe8588f97498fb85a929d.gif\" width=\"320\" height=\"707\"><figcaption><\/figcaption><\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c2f\/7c2\/792\/c2f7c2792307151ba99de5e89972fedb.gif\" alt=\"\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0438\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\" title=\"\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0438\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\" width=\"320\" height=\"707\"><figcaption>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0438\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/figcaption><\/figure>\n<\/p>\n<p>\u0423\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0438 \u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0444\u043e\u0440\u043c\u0430\u043c\u0438. \u0418\u0442\u0430\u043a, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u043d\u0435\u043c.<\/p>\n<h2>\u0427\u0442\u043e \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f?<\/h2>\n<ol>\n<li>\n<p><a href=\"https:\/\/developer.android.com\/kotlin\"><u>Kotlin<\/u><\/a><\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u0430\u0442\u044c\u044f <a href=\"https:\/\/medium.com\/better-programming\/android-data-binding-139686b65aec\"><u>\u0421\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/u><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/material.io\/\"><u>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Material<\/u><\/a><\/p>\n<\/li>\n<\/ol>\n<p>\u042f \u0440\u0430\u0437\u043e\u0431\u044c\u044e \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u044d\u0442\u0430\u043f\u044b, \u0447\u0442\u043e\u0431\u044b \u043b\u0435\u0433\u0447\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c.<\/p>\n<p><strong>1.<\/strong> \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u043c \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0444\u0430\u0439\u043b\u0435 <code>build.gradle(:app)<\/code>, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043f\u043e\u0434 \u0442\u0435\u0433 <code>android{}<\/code> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<pre><code class=\"kotlin\">dataBinding{&nbsp; &nbsp;      enabled true }<\/code><\/pre>\n<\/p>\n<p>\u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 <code>textInputLayout<\/code> \u0438 <code>textInputEditText<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 Material \u0434\u043b\u044f Android, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0432 \u0444\u0430\u0439\u043b <code>build.gradle(:app)<\/code> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c:<\/p>\n<pre><code class=\"kotlin\">implementation 'com.google.android.material:material:1.2.1'<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u0430\u043a\u0435\u0442 \u043d\u0430\u0448\u0435\u0439 \u0444\u043e\u0440\u043c\u044b. \u042f \u0441\u0434\u0435\u043b\u0430\u044e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043c\u0430\u043a\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u043e\u044f \u0446\u0435\u043b\u044c&nbsp;\u2014 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u0430 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0434\u0438\u0437\u0430\u0439\u043d.<\/p>\n<\/p>\n<p>\u042f \u0441\u043e\u0437\u0434\u0430\u043b \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043c\u0430\u043a\u0435\u0442:<\/p>\n<p>&nbsp;<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d27\/488\/d7e\/d27488d7e9761d650ec1056e678cbf21\" width=\"500\" height=\"886\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u043e\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 <code>activity_main.xml<\/code>:<\/p>\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt; &lt;layout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"     xmlns:app=\"http:\/\/schemas.android.com\/apk\/res-auto\"     xmlns:tools=\"http:\/\/schemas.android.com\/tools\"&gt;      &lt;LinearLayout         android:layout_width=\"match_parent\"         android:layout_height=\"match_parent\"         android:layout_margin=\"10dp\"         android:orientation=\"vertical\"         tools:context=\".MainActivity\"&gt;           &lt;com.google.android.material.textfield.TextInputLayout             android:id=\"@+id\/userNameTextInputLayout\"             style=\"@style\/TextInputLayoutBoxColor\"             android:layout_width=\"match_parent\"             android:layout_height=\"wrap_content\"             android:layout_marginTop=\"10dp\"             android:hint=\"@string\/username\"             app:endIconMode=\"clear_text\"             app:errorEnabled=\"true\"             app:hintTextAppearance=\"@style\/TextAppearance.App.TextInputLayout\"&gt;              &lt;com.google.android.material.textfield.TextInputEditText                 android:id=\"@+id\/userName\"                 android:layout_width=\"match_parent\"                 android:layout_height=\"50dp\"                 android:inputType=\"textPersonName\" \/&gt;           &lt;\/com.google.android.material.textfield.TextInputLayout&gt;          &lt;com.google.android.material.textfield.TextInputLayout             android:id=\"@+id\/emailTextInputLayout\"             style=\"@style\/TextInputLayoutBoxColor\"             android:layout_width=\"match_parent\"             android:layout_height=\"wrap_content\"             android:layout_marginTop=\"5dp\"             android:hint=\"@string\/email\"             app:endIconMode=\"clear_text\"             app:errorEnabled=\"true\"             app:hintTextAppearance=\"@style\/TextAppearance.App.TextInputLayout\"&gt;              &lt;com.google.android.material.textfield.TextInputEditText                 android:id=\"@+id\/email\"                 android:layout_width=\"match_parent\"                 android:layout_height=\"50dp\"                 android:inputType=\"textEmailAddress\" \/&gt;           &lt;\/com.google.android.material.textfield.TextInputLayout&gt;          &lt;com.google.android.material.textfield.TextInputLayout             android:id=\"@+id\/passwordTextInputLayout\"             style=\"@style\/TextInputLayoutBoxColor\"             android:layout_width=\"match_parent\"             android:layout_height=\"wrap_content\"             android:layout_marginTop=\"5dp\"             android:hint=\"@string\/password\"             app:errorEnabled=\"true\"             app:hintTextAppearance=\"@style\/TextAppearance.App.TextInputLayout\"             app:passwordToggleEnabled=\"true\"&gt;              &lt;com.google.android.material.textfield.TextInputEditText                 android:id=\"@+id\/password\"                 android:layout_width=\"match_parent\"                 android:layout_height=\"50dp\"                 android:inputType=\"textPassword\" \/&gt;           &lt;\/com.google.android.material.textfield.TextInputLayout&gt;          &lt;com.google.android.material.textfield.TextInputLayout             android:id=\"@+id\/confirmPasswordTextInputLayout\"             style=\"@style\/TextInputLayoutBoxColor\"             android:layout_width=\"match_parent\"             android:layout_height=\"wrap_content\"             android:layout_marginTop=\"5dp\"             android:hint=\"@string\/confirm_password\"             app:errorEnabled=\"true\"             app:hintTextAppearance=\"@style\/TextAppearance.App.TextInputLayout\"             app:passwordToggleEnabled=\"true\"&gt;              &lt;com.google.android.material.textfield.TextInputEditText                 android:id=\"@+id\/confirmPassword\"                 android:layout_width=\"match_parent\"                 android:layout_height=\"50dp\"                 android:inputType=\"textPassword\"                 app:passwordToggleEnabled=\"true\" \/&gt;           &lt;\/com.google.android.material.textfield.TextInputLayout&gt;          &lt;com.google.android.material.button.MaterialButton             android:id=\"@+id\/loginButton\"             android:layout_width=\"match_parent\"             android:layout_height=\"wrap_content\"             android:text=\"@string\/login\"             android:textAllCaps=\"false\" \/&gt;      &lt;\/LinearLayout&gt; &lt;\/layout&gt;<\/code><\/pre>\n<p><em>\u0415\u0441\u043b\u0438 \u0432\u0430\u0441 \u0441\u043c\u0443\u0449\u0430\u044e\u0442 \u0442\u0435\u0433\u0438 <\/em><code>&lt;layout&gt;<\/code><em>, \u043d\u0435 \u043f\u0435\u0440\u0435\u0436\u0438\u0432\u0430\u0439\u0442\u0435&nbsp;\u2014 \u043e \u043d\u0438\u0445 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0432 \u0441\u0432\u043e\u0435\u0439 <\/em><a href=\"https:\/\/medium.com\/better-programming\/android-data-binding-139686b65aec\"><em><u>\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/u><\/em><\/a><em>.<\/em><\/p>\n<p>\u041d\u0430\u0448 \u043c\u0430\u043a\u0435\u0442 \u0433\u043e\u0442\u043e\u0432. \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u043a\u043e\u0434\u043e\u043c.<\/p>\n<\/p>\n<p><strong>2.<\/strong> \u041d\u0430 GIF-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u0441\u043c. \u0432\u044b\u0448\u0435), \u0432\u0438\u0434\u043d\u043e, \u043a\u0430\u043a \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438 \u0438\u0441\u0447\u0435\u0437\u0430\u044e\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>true<\/strong>. \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u044f \u0441\u0432\u044f\u0437\u0430\u043b \u043a\u0430\u0436\u0434\u043e\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c <strong>TextWatcher<\/strong>, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043f\u043e \u043c\u0435\u0440\u0435 \u0432\u0432\u043e\u0434\u0430 \u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c.<\/p>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 <code>MainActivity.kt<\/code> \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 <code>TextWatcher<\/code>:<\/p>\n<pre><code class=\"kotlin\">\/**      * applying text watcher on each text field      *\/     inner class TextFieldValidation(private val view: View) : TextWatcher {         override fun afterTextChanged(s: Editable?) {}         override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {}         override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {             \/\/ checking ids of each text field and applying functions accordingly.          }      }<\/code><\/pre>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>view<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043a\u043b\u0430\u0441\u0441\u0430, \u044f \u043e\u043f\u0438\u0448\u0443 \u043f\u043e\u0437\u0436\u0435.<\/p>\n<\/p>\n<p><strong>3.<\/strong> \u042d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c. \u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0440\u044f\u0434 \u0443\u0441\u043b\u043e\u0432\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 true \u043f\u0435\u0440\u0435\u0434 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u044b. \u041a\u043e\u0434, \u0437\u0430\u0434\u0430\u044e\u0449\u0438\u0439 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044f, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043d\u0438\u0436\u0435:<\/p>\n<pre><code class=\"kotlin\">  \/**      * field must not be empy      *\/     private fun validateUserName(): Boolean {         if (binding.userName.text.toString().trim().isEmpty()) {             binding.userNameTextInputLayout.error = \"Required Field!\"             binding.userName.requestFocus()             return false         } else {             binding.userNameTextInputLayout.isErrorEnabled = false         }         return true     }      \/**      * 1) field must not be empty      * 2) text should matches email address format      *\/     private fun validateEmail(): Boolean {         if (binding.email.text.toString().trim().isEmpty()) {             binding.emailTextInputLayout.error = \"Required Field!\"             binding.email.requestFocus()             return false         } else if (!isValidEmail(binding.email.text.toString())) {             binding.emailTextInputLayout.error = \"Invalid Email!\"             binding.email.requestFocus()             return false         } else {             binding.emailTextInputLayout.isErrorEnabled = false         }         return true     }      \/**      * 1) field must not be empty      * 2) password lenght must not be less than 6      * 3) password must contain at least one digit      * 4) password must contain atleast one upper and one lower case letter      * 5) password must contain atleast one special character.      *\/     private fun validatePassword(): Boolean {         if (binding.password.text.toString().trim().isEmpty()) {             binding.passwordTextInputLayout.error = \"Required Field!\"             binding.password.requestFocus()             return false         } else if (binding.password.text.toString().length &lt; 6) {             binding.passwordTextInputLayout.error = \"password can't be less than 6\"             binding.password.requestFocus()             return false         } else if (!isStringContainNumber(binding.password.text.toString())) {             binding.passwordTextInputLayout.error = \"Required at least 1 digit\"             binding.password.requestFocus()             return false         } else if (!isStringLowerAndUpperCase(binding.password.text.toString())) {             binding.passwordTextInputLayout.error =                 \"Password must contain upper and lower case letters\"             binding.password.requestFocus()             return false         } else if (!isStringContainSpecialCharacter(binding.password.text.toString())) {             binding.passwordTextInputLayout.error = \"1 special character required\"             binding.password.requestFocus()             return false         } else {             binding.passwordTextInputLayout.isErrorEnabled = false         }         return true     }      \/**      * 1) field must not be empty      * 2) password and confirm password should be same      *\/     private fun validateConfirmPassword(): Boolean {         when {             binding.confirmPassword.text.toString().trim().isEmpty() -&gt; {                 binding.confirmPasswordTextInputLayout.error = \"Required Field!\"                 binding.confirmPassword.requestFocus()                 return false             }             binding.confirmPassword.text.toString() != binding.password.text.toString() -&gt; {                 binding.confirmPasswordTextInputLayout.error = \"Passwords don't match\"                 binding.confirmPassword.requestFocus()                 return false             }             else -&gt; {                 binding.confirmPasswordTextInputLayout.isErrorEnabled = false             }         }         return true     }<\/code><\/pre>\n<\/p>\n<p><strong>4.<\/strong> \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0441 \u043a\u043b\u0430\u0441\u0441\u043e\u043c <code>textWatcher<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u0440\u0430\u043d\u0435\u0435:<\/p>\n<pre><code class=\"kotlin\"> private fun setupListeners() {         binding.userName.addTextChangedListener(TextFieldValidation(binding.userName))         binding.email.addTextChangedListener(TextFieldValidation(binding.email))         binding.password.addTextChangedListener(TextFieldValidation(binding.password))         binding.confirmPassword.addTextChangedListener(TextFieldValidation(binding.confirmPassword))     }<\/code><\/pre>\n<p>\u041d\u043e \u043a\u0430\u043a \u043a\u043b\u0430\u0441\u0441 <code>TextFieldValidation<\/code> \u0443\u0437\u043d\u0430\u0435\u0442, \u0441 \u043a\u0430\u043a\u0438\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c \u043f\u043e\u043b\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f? \u041f\u0440\u043e\u043a\u0440\u0443\u0442\u0438\u0432 \u0441\u0442\u0430\u0442\u044c\u044e \u0432\u044b\u0448\u0435, \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u0432 \u043e\u0434\u0438\u043d \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043a\u043b\u0430\u0441\u0441\u0430 <code>TextFieldValidation<\/code>:<\/p>\n<pre><code>\/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/code><\/pre>\n<\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u044f \u043f\u0435\u0440\u0435\u0434\u0430\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 view \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 <code>TextFieldValidation<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"kotlin\">\/**      * applying text watcher on each text field      *\/     inner class TextFieldValidation(private val view: View) : TextWatcher {         override fun afterTextChanged(s: Editable?) {}         override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {}         override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {             \/\/ checking ids of each text field and applying functions accordingly.             when (view.id) {                 R.id.userName -&gt; {                     validateUserName()                 }                 R.id.email -&gt; {                     validateEmail()                 }                 R.id.password -&gt; {                     validatePassword()                 }                 R.id.confirmPassword -&gt; {                     validateConfirmPassword()                 }             }         }     }<\/code><\/pre>\n<p>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0444\u0430\u0439\u043b\u0430 <code>MainActivity.kt<\/code> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"kotlin\">package com.example.textinputlayoutformvalidation  import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.text.Editable import android.text.TextWatcher import android.util.Patterns import android.view.View import android.widget.Toast import androidx.databinding.DataBindingUtil import com.example.textinputlayoutformvalidation.FieldValidators.isStringContainNumber import com.example.textinputlayoutformvalidation.FieldValidators.isStringContainSpecialCharacter import com.example.textinputlayoutformvalidation.FieldValidators.isStringLowerAndUpperCase import com.example.textinputlayoutformvalidation.FieldValidators.isValidEmail import com.example.textinputlayoutformvalidation.databinding.ActivityMainBinding  \/**  * created by : Mustufa Ansari  * Email : mustufaayub82@gmail.com  *\/  class MainActivity : AppCompatActivity() {      lateinit var binding: ActivityMainBinding       override fun onCreate(savedInstanceState: Bundle?) {         super.onCreate(savedInstanceState)         binding = DataBindingUtil.setContentView(this, R.layout.activity_main)          setupListeners()          binding.loginButton.setOnClickListener {             if (isValidate()) {                 Toast.makeText(this, \"validated\", Toast.LENGTH_SHORT).show()             }         }     }      private fun isValidate(): Boolean =         validateUserName() &amp;&amp; validateEmail() &amp;&amp; validatePassword() &amp;&amp; validateConfirmPassword()      private fun setupListeners() {         binding.userName.addTextChangedListener(TextFieldValidation(binding.userName))         binding.email.addTextChangedListener(TextFieldValidation(binding.email))         binding.password.addTextChangedListener(TextFieldValidation(binding.password))         binding.confirmPassword.addTextChangedListener(TextFieldValidation(binding.confirmPassword))     }      \/**      * field must not be empy      *\/     private fun validateUserName(): Boolean {         if (binding.userName.text.toString().trim().isEmpty()) {             binding.userNameTextInputLayout.error = \"Required Field!\"             binding.userName.requestFocus()             return false         } else {             binding.userNameTextInputLayout.isErrorEnabled = false         }         return true     }      \/**      * 1) field must not be empty      * 2) text should matches email address format      *\/     private fun validateEmail(): Boolean {         if (binding.email.text.toString().trim().isEmpty()) {             binding.emailTextInputLayout.error = \"Required Field!\"             binding.email.requestFocus()             return false         } else if (!isValidEmail(binding.email.text.toString())) {             binding.emailTextInputLayout.error = \"Invalid Email!\"             binding.email.requestFocus()             return false         } else {             binding.emailTextInputLayout.isErrorEnabled = false         }         return true     }      \/**      * 1) field must not be empty      * 2) password lenght must not be less than 6      * 3) password must contain at least one digit      * 4) password must contain atleast one upper and one lower case letter      * 5) password must contain atleast one special character.      *\/     private fun validatePassword(): Boolean {         if (binding.password.text.toString().trim().isEmpty()) {             binding.passwordTextInputLayout.error = \"Required Field!\"             binding.password.requestFocus()             return false         } else if (binding.password.text.toString().length &lt; 6) {             binding.passwordTextInputLayout.error = \"password can't be less than 6\"             binding.password.requestFocus()             return false         } else if (!isStringContainNumber(binding.password.text.toString())) {             binding.passwordTextInputLayout.error = \"Required at least 1 digit\"             binding.password.requestFocus()             return false         } else if (!isStringLowerAndUpperCase(binding.password.text.toString())) {             binding.passwordTextInputLayout.error =                 \"Password must contain upper and lower case letters\"             binding.password.requestFocus()             return false         } else if (!isStringContainSpecialCharacter(binding.password.text.toString())) {             binding.passwordTextInputLayout.error = \"1 special character required\"             binding.password.requestFocus()             return false         } else {             binding.passwordTextInputLayout.isErrorEnabled = false         }         return true     }      \/**      * 1) field must not be empty      * 2) password and confirm password should be same      *\/     private fun validateConfirmPassword(): Boolean {         when {             binding.confirmPassword.text.toString().trim().isEmpty() -&gt; {                 binding.confirmPasswordTextInputLayout.error = \"Required Field!\"                 binding.confirmPassword.requestFocus()                 return false             }             binding.confirmPassword.text.toString() != binding.password.text.toString() -&gt; {                 binding.confirmPasswordTextInputLayout.error = \"Passwords don't match\"                 binding.confirmPassword.requestFocus()                 return false             }             else -&gt; {                 binding.confirmPasswordTextInputLayout.isErrorEnabled = false             }         }         return true     }      \/**      * applying text watcher on each text field      *\/     inner class TextFieldValidation(private val view: View) : TextWatcher {         override fun afterTextChanged(s: Editable?) {}         override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {}         override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {             \/\/ checking ids of each text field and applying functions accordingly.             when (view.id) {                 R.id.userName -&gt; {                     validateUserName()                 }                 R.id.email -&gt; {                     validateEmail()                 }                 R.id.password -&gt; {                     validatePassword()                 }                 R.id.confirmPassword -&gt; {                     validateConfirmPassword()                 }             }         }     } }<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u043b\u044e\u0431\u0443\u0435\u043c\u0441\u044f \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u0444\u043e\u0440\u043c\u044b \u0432\u0432\u043e\u0434\u0430:<\/p>\n<p>&nbsp;<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b6c\/673\/763\/b6c673763544a5ee5f481fc7f50bec5f.gif\" width=\"320\" height=\"707\"><figcaption><\/figcaption><\/figure>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/faf\/695\/de2\/faf695de2de265c96f198d010ecab0b3.gif\" width=\"320\" height=\"707\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u043d\u0438\u0436\u0435:<\/p>\n<h3>https:\/\/github.com\/Mustufa786\/TextInputLayout-FormValidation<\/h3>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u044b \u0443\u0437\u043d\u0430\u043b\u0438 \u0438\u0437 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435 \u0434\u043b\u044f \u0441\u0435\u0431\u044f. \u0421\u043b\u0435\u0434\u0438\u0442\u0435 \u0437\u0430 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043d\u043e\u0432\u044b\u0445 \u0441\u0442\u0430\u0442\u0435\u0439! \u0423\u0441\u043f\u0435\u0445\u043e\u0432 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435!<\/p>\n<blockquote>\n<p><a href=\"https:\/\/otus.pw\/Plc2\/\">\u0423\u0437\u043d\u0430\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043a\u0443\u0440\u0441\u0435.<\/a><\/p>\n<\/blockquote>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/529886\/\"> https:\/\/habr.com\/ru\/company\/otus\/blog\/529886\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<blockquote>\n<p>\u041f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0432 OTUS \u043e\u0442\u043a\u0440\u044b\u0442 \u043d\u0430\u0431\u043e\u0440 \u043d\u0430 <a href=\"https:\/\/otus.pw\/Plc2\/\">\u043d\u043e\u0432\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u043a\u0443\u0440\u0441\u0430 &#171;Android Developer. Basic&#187;<\/a>. \u0412 \u043f\u0440\u0435\u0434\u0434\u0432\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0440\u0442\u0430 \u043a\u0443\u0440\u0441\u0430 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0438 \u0434\u043b\u044f \u0432\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/otus.pw\/Plc2\/\">\u0434\u0435\u043d\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0434\u0432\u0435\u0440\u0435\u0439 \u043f\u043e \u043a\u0443\u0440\u0441\u0443, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0443\u0437\u043d\u0430\u0435\u0442\u0435 \u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b<\/a>.<\/p>\n<\/blockquote>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<hr>\n<h3>\u0423\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0444\u043e\u0440\u043c<\/h3>\n<\/p>\n<p><em>\u00ab\u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0447\u0435\u043c\u0443-\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e, \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438\u00bb.<\/em><\/p>\n<p>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043d\u0435\u0439 \u043d\u0430\u0437\u0430\u0434 \u044f \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0430\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c, \u0433\u0434\u0435 \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0444\u043e\u0440\u043c\u044b <code>textInputLayout<\/code> \u0438 <code>textInputEditText<\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443.<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432 \u044f \u0434\u043e\u0431\u0438\u043b\u0441\u044f \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430, \u0438\u0437\u0443\u0447\u0438\u0432 \u043a\u043e\u0435-\u043a\u0430\u043a\u0438\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u0438 \u043f\u0440\u043e\u0432\u0435\u0434\u044f \u0440\u044f\u0434 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432. \u0412\u043e\u0442 \u0447\u0442\u043e \u044f \u0445\u043e\u0442\u0435\u043b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c:<\/p>\n<p>&nbsp;<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<figure class=\"\"><figcaption>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0438\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/figcaption><\/figure>\n<\/p>\n<p>\u0423\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0438 \u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0444\u043e\u0440\u043c\u0430\u043c\u0438. \u0418\u0442\u0430\u043a, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u043d\u0435\u043c.<\/p>\n<h2>\u0427\u0442\u043e \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f?<\/h2>\n<ol>\n<li>\n<p><a href=\"https:\/\/developer.android.com\/kotlin\"><u>Kotlin<\/u><\/a><\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u0430\u0442\u044c\u044f <a href=\"https:\/\/medium.com\/better-programming\/android-data-binding-139686b65aec\"><u>\u0421\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/u><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/material.io\/\"><u>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Material<\/u><\/a><\/p>\n<\/li>\n<\/ol>\n<p>\u042f \u0440\u0430\u0437\u043e\u0431\u044c\u044e \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u044d\u0442\u0430\u043f\u044b, \u0447\u0442\u043e\u0431\u044b \u043b\u0435\u0433\u0447\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c.<\/p>\n<p><strong>1.<\/strong> \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u043c \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0444\u0430\u0439\u043b\u0435 <code>build.gradle(:app)<\/code>, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043f\u043e\u0434 \u0442\u0435\u0433 <code>android{}<\/code> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<pre><code class=\"kotlin\">dataBinding{&nbsp; &nbsp;      enabled true }<\/code><\/pre>\n<\/p>\n<p>\u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 <code>textInputLayout<\/code> \u0438 <code>textInputEditText<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 Material \u0434\u043b\u044f Android, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0432 \u0444\u0430\u0439\u043b <code>build.gradle(:app)<\/code> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c:<\/p>\n<pre><code class=\"kotlin\">implementation 'com.google.android.material:material:1.2.1'<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u0430\u043a\u0435\u0442 \u043d\u0430\u0448\u0435\u0439 \u0444\u043e\u0440\u043c\u044b. \u042f \u0441\u0434\u0435\u043b\u0430\u044e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043c\u0430\u043a\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u043e\u044f \u0446\u0435\u043b\u044c&nbsp;\u2014 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u0430 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0434\u0438\u0437\u0430\u0439\u043d.<\/p>\n<\/p>\n<p>\u042f \u0441\u043e\u0437\u0434\u0430\u043b \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043c\u0430\u043a\u0435\u0442:<\/p>\n<p>&nbsp;<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u043e\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 <code>activity_main.xml<\/code>:<\/p>\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt; &lt;layout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"     xmlns:app=\"http:\/\/schemas.android.com\/apk\/res-auto\"     xmlns:tools=\"http:\/\/schemas.android.com\/tools\"&gt;      &lt;LinearLayout         android:layout_width=\"match_parent\"         android:layout_height=\"match_parent\"         android:layout_margin=\"10dp\"         android:orientation=\"vertical\"         tools:context=\".MainActivity\"&gt;           &lt;com.google.android.material.textfield.TextInputLayout             android:id=\"@+id\/userNameTextInputLayout\"             style=\"@style\/TextInputLayoutBoxColor\"             android:layout_width=\"match_parent\"             android:layout_height=\"wrap_content\"             android:layout_marginTop=\"10dp\"             android:hint=\"@string\/username\"             app:endIconMode=\"clear_text\"             app:errorEnabled=\"true\"             app:hintTextAppearance=\"@style\/TextAppearance.App.TextInputLayout\"&gt;              &lt;com.google.android.material.textfield.TextInputEditText                 android:id=\"@+id\/userName\"                 android:layout_width=\"match_parent\"                 android:layout_height=\"50dp\"                 android:inputType=\"textPersonName\" \/&gt;           &lt;\/com.google.android.material.textfield.TextInputLayout&gt;          &lt;com.google.android.material.textfield.TextInputLayout             android:id=\"@+id\/emailTextInputLayout\"             style=\"@style\/TextInputLayoutBoxColor\"             android:layout_width=\"match_parent\"             android:layout_height=\"wrap_content\"             android:layout_marginTop=\"5dp\"             android:hint=\"@string\/email\"             app:endIconMode=\"clear_text\"             app:errorEnabled=\"true\"             app:hintTextAppearance=\"@style\/TextAppearance.App.TextInputLayout\"&gt;              &lt;com.google.android.material.textfield.TextInputEditText                 android:id=\"@+id\/email\"                 android:layout_width=\"match_parent\"                 android:layout_height=\"50dp\"                 android:inputType=\"textEmailAddress\" \/&gt;           &lt;\/com.google.android.material.textfield.TextInputLayout&gt;          &lt;com.google.android.material.textfield.TextInputLayout             android:id=\"@+id\/passwordTextInputLayout\"             style=\"@style\/TextInputLayoutBoxColor\"             android:layout_width=\"match_parent\"             android:layout_height=\"wrap_content\"             android:layout_marginTop=\"5dp\"             android:hint=\"@string\/password\"             app:errorEnabled=\"true\"             app:hintTextAppearance=\"@style\/TextAppearance.App.TextInputLayout\"             app:passwordToggleEnabled=\"true\"&gt;              &lt;com.google.android.material.textfield.TextInputEditText                 android:id=\"@+id\/password\"                 android:layout_width=\"match_parent\"                 android:layout_height=\"50dp\"                 android:inputType=\"textPassword\" \/&gt;           &lt;\/com.google.android.material.textfield.TextInputLayout&gt;          &lt;com.google.android.material.textfield.TextInputLayout             android:id=\"@+id\/confirmPasswordTextInputLayout\"             style=\"@style\/TextInputLayoutBoxColor\"             android:layout_width=\"match_parent\"             android:layout_height=\"wrap_content\"             android:layout_marginTop=\"5dp\"             android:hint=\"@string\/confirm_password\"             app:errorEnabled=\"true\"             app:hintTextAppearance=\"@style\/TextAppearance.App.TextInputLayout\"             app:passwordToggleEnabled=\"true\"&gt;              &lt;com.google.android.material.textfield.TextInputEditText                 android:id=\"@+id\/confirmPassword\"                 android:layout_width=\"match_parent\"                 android:layout_height=\"50dp\"                 android:inputType=\"textPassword\"                 app:passwordToggleEnabled=\"true\" \/&gt;           &lt;\/com.google.android.material.textfield.TextInputLayout&gt;          &lt;com.google.android.material.button.MaterialButton             android:id=\"@+id\/loginButton\"             android:layout_width=\"match_parent\"             android:layout_height=\"wrap_content\"             android:text=\"@string\/login\"             android:textAllCaps=\"false\" \/&gt;      &lt;\/LinearLayout&gt; &lt;\/layout&gt;<\/code><\/pre>\n<p><em>\u0415\u0441\u043b\u0438 \u0432\u0430\u0441 \u0441\u043c\u0443\u0449\u0430\u044e\u0442 \u0442\u0435\u0433\u0438 <\/em><code>&lt;layout&gt;<\/code><em>, \u043d\u0435 \u043f\u0435\u0440\u0435\u0436\u0438\u0432\u0430\u0439\u0442\u0435&nbsp;\u2014 \u043e \u043d\u0438\u0445 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0432 \u0441\u0432\u043e\u0435\u0439 <\/em><a href=\"https:\/\/medium.com\/better-programming\/android-data-binding-139686b65aec\"><em><u>\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/u><\/em><\/a><em>.<\/em><\/p>\n<p>\u041d\u0430\u0448 \u043c\u0430\u043a\u0435\u0442 \u0433\u043e\u0442\u043e\u0432. \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u043a\u043e\u0434\u043e\u043c.<\/p>\n<\/p>\n<p><strong>2.<\/strong> \u041d\u0430 GIF-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u0441\u043c. \u0432\u044b\u0448\u0435), \u0432\u0438\u0434\u043d\u043e, \u043a\u0430\u043a \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438 \u0438\u0441\u0447\u0435\u0437\u0430\u044e\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>true<\/strong>. \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u044f \u0441\u0432\u044f\u0437\u0430\u043b \u043a\u0430\u0436\u0434\u043e\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c <strong>TextWatcher<\/strong>, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043f\u043e \u043c\u0435\u0440\u0435 \u0432\u0432\u043e\u0434\u0430 \u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c.<\/p>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 <code>MainActivity.kt<\/code> \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 <code>TextWatcher<\/code>:<\/p>\n<pre><code class=\"kotlin\">\/**      * applying text watcher on each text field      *\/     inner class TextFieldValidation(private val view: View) : TextWatcher {         override fun afterTextChanged(s: Editable?) {}         override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {}         override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {             \/\/ checking ids of each text field and applying functions accordingly.          }      }<\/code><\/pre>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>view<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043a\u043b\u0430\u0441\u0441\u0430, \u044f \u043e\u043f\u0438\u0448\u0443 \u043f\u043e\u0437\u0436\u0435.<\/p>\n<\/p>\n<p><strong>3.<\/strong> \u042d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c. \u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0440\u044f\u0434 \u0443\u0441\u043b\u043e\u0432\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 true \u043f\u0435\u0440\u0435\u0434 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u043e\u0440\u043c\u044b. \u041a\u043e\u0434, \u0437\u0430\u0434\u0430\u044e\u0449\u0438\u0439 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044f, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043d\u0438\u0436\u0435:<\/p>\n<pre><code class=\"kotlin\">  \/**      * field must not be empy      *\/     private fun validateUserName(): Boolean {         if (binding.userName.text.toString().trim().isEmpty()) {             binding.userNameTextInputLayout.error = \"Required Field!\"             binding.userName.requestFocus()             return false         } else {             binding.userNameTextInputLayout.isErrorEnabled = false         }         return true     }      \/**      * 1) field must not be empty      * 2) text should matches email address format      *\/     private fun validateEmail(): Boolean {         if (binding.email.text.toString().trim().isEmpty()) {             binding.emailTextInputLayout.error = \"Required Field!\"             binding.email.requestFocus()             return false         } else if (!isValidEmail(binding.email.text.toString())) {             binding.emailTextInputLayout.error = \"Invalid Email!\"             binding.email.requestFocus()             return false         } else {             binding.emailTextInputLayout.isErrorEnabled = false         }         return true     }      \/**      * 1) field must not be empty      * 2) password lenght must not be less than 6      * 3) password must contain at least one digit      * 4) password must contain atleast one upper and one lower case letter      * 5) password must contain atleast one special character.      *\/     private fun validatePassword(): Boolean {         if (binding.password.text.toString().trim().isEmpty()) {             binding.passwordTextInputLayout.error = \"Required Field!\"             binding.password.requestFocus()             return false         } else if (binding.password.text.toString().length &lt; 6) {             binding.passwordTextInputLayout.error = \"password can't be less than 6\"             binding.password.requestFocus()             return false         } else if (!isStringContainNumber(binding.password.text.toString())) {             binding.passwordTextInputLayout.error = \"Required at least 1 digit\"             binding.password.requestFocus()             return false         } else if (!isStringLowerAndUpperCase(binding.password.text.toString())) {             binding.passwordTextInputLayout.error =                 \"Password must contain upper and lower case letters\"             binding.password.requestFocus()             return false         } else if (!isStringContainSpecialCharacter(binding.password.text.toString())) {             binding.passwordTextInputLayout.error = \"1 special character required\"             binding.password.requestFocus()             return false         } else {             binding.passwordTextInputLayout.isErrorEnabled = false         }         return true     }      \/**      * 1) field must not be empty      * 2) password and confirm password should be same      *\/     private<\/code><\/pre>\n<\/hr>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-313796","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/313796","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=313796"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/313796\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=313796"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=313796"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=313796"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}