All language subtitles for 009 Validating Passwords_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

In this lecture, we're going to validate the password fields.

We have two of them in our form.

The second field is to verify the password.

We want to check that the user is sure about their password.

VALIDATE has a rule for checking if two fields match.

We'll learn about what that rule is in a moment.

First, we'll focus on preparing the fields under the age field.

You'll find the password field will change the input field to the field component.

We'll set the name attribute to password.

Next, we'll begin adding the rules in these schema object, we'll use the following rules for the password

field required minimum, maximum.

Throughout this section, you'll notice I've been setting a minimum and maximum cap for each input,

this rule set isn't required but recommended.

Most databases will usually come with a limit on how much data can be inserted into it.

While it's not your responsibility to manage the database.

It's always good to ask or check what the limits are.

This will allow you to import those limits in your forms.

The limits I'm using are ones I use in real applications.

Feel free to follow along.

Sometimes you may need to use different limits, increase or decrease the limits as you see fit.

The next step is to work on outputting the error.

We'll use the same markup for the other input fields.

Scroll back to the password field copy and paste the markup for the error message from any other inputs

we've already validated pasted below the password field.

The name property will need to be updated to password.

We can work on the next input, same process as before the confirmed password field can be found directly

below the password field.

We'll do the same thing we did to the other components, change the input element to the field component.

Will sent the name attribute to confirm password.

Up next, we need to add the rules, we're not going to use the same rules we used for the password

field, it's not necessary to apply the same rules.

The purpose of the confirmation password field is to double check that the user correctly inputted their

password.

The rule will want to use should check if the input matches the input in the password field.

This can seem a little tricky, but luckily we validate comes with an easy to use solution.

First, we'll need to import and register the rule, open the validation file, import a rule called

confirms.

In the Insull method for the plug in will add the confirmed rule with the defined rule function.

The confirmed rule will check if the value inside the current input matches a value in another input,

let's learn how to use it.

Switch back to the authentication component file.

Let's go to these schema object in our data function.

Will aren't the confirmed rule to the confirmed password field?

The confirmed rule requires you pass in the name of the field, the current input should match against

will set this rule to at password.

The value must correspond to the name we assigned to the field component with the value we're checking

against the at symbol is required.

It'll tell validate to search for a field with this name.

This rule will tell validate to search for a field component with the name password.

The last thing we'll need to do is at the ER, let's scroll back up to the template.

We'll copy the error message component from one of the previous fields.

Then we'll paste it below the confirmed password field.

We'll change the expression to password confirm.

We're finished.

Let's open the form in the browser.

We'll input some values for both fields, if both password's don't match, we should see an error telling

us that they don't match.

Will receive an error from the validate, if we were to make the passwords match, then the error will

go away.

Great, we're finished with the name Email Age and Password Fields, we were able to cover some additional

rules.

A lot of the rules we covered can be reviewed by visiting the documentation.

We've still got a few more fields to validate.

Let's finish this up in the next couple of lectures.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.