All language subtitles for 016 Validation Triggers_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 talk about validation triggers, the validates can be configured to

validate an input on different events.

If we want, we can go with an aggressive validation tactic for validating inputs.

First, let's understand the default behavior as to when an input is validated.

Validation is performed on one of four occasions.

If the input field emits the change event, validation will be performs.

The change event is emitted whenever an alteration is made to the elements value.

The second occasion is when value changes internally via JavaScript.

It's possible to add the model directive to an input.

If we decide to add the the model directive validate, we'll watch for changes on the property we have

bound to the input.

If a change occurs internally, validation will be triggered.

The third occasion is when the blurr event is emitted.

The blur and change events can sometimes occur at similar times.

The difference between them is the Blur event is fired.

When the user touches an input and moves away.

It doesn't matter if they changed the input.

As long as it was touched, the event will be emitted.

The last occasion is when the form is submitted, all fields will be validated.

Validate allows us to change when an input is validated.

We don't have to stick with the default strategy.

We are going to be working in the validation file, open it in your editor.

We can change the validation trigger on all fields by updating the object we passed into the configure

function.

There are four options we can set to change the default behavior.

Let's run through them one by one at the end of the object.

We're going to add a property called Validate on blurr.

Its value will be true.

They validate on blurr option will tell validate if it should validate a field on the blurr event by

default, this option is set to true.

You can set it to false for a less aggressive behavior.

The next property will add is called validate on change.

Its value will be true.

They validate unchanged option will tell the validate if it should validate a field on the change event,

the default value is true.

Afterward, we have the validate on input option.

We will set this to false.

This option is probably the most aggressive validation trigger, the input event is fired whenever the

input changes, it's different from the change event because it'll fire on every keystroke the moment

the user presses a key if the value is invalid and error will appear immediately.

This option may be appropriate for inputs like passwords, but it's excessive for most input's.

Users don't like to have errors thrown at them immediately.

It's better if we wait until they have finished filling out the field.

However, that's my opinion.

Feel free to turn this on.

The default value for this option is false.

The last validation trigger is called validate on model update.

The default value is true.

This option will tell validate to validate the input whenever the value changes internally through the

fee model directive, a total of four options to change the validation triggers.

We are using the default values because I think the default behavior works fine for our case.

I wanted to show you these options in case you need to change.

The default behavior in the next lecture will continue working on validation.

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