In the photo to be used to the quest we used to make a request to render a form than we used to make
a request to submit to form, then on the basis of that, we should have a..
Either success or error basically in this one.
What we're going to do, we are going to die.
There can be multiple errors in the form.
So like post that, I hired a new one to do this and we the email.
OK, so I'll give it as a title, as email.
And so e-mail is the new title to my home.
Email the new field I to my form.
OK, now and we'll short by and also request.
He is his request.
Don't post
an e-mail as a barometer.
So you can see that in my phone, which provided a new free e-mail, if I'm carpool you to e-mail.
And in the very same way, it was a text input that I requested for e-mail.
OK, now what I do here, we are trying to see that there can be multiple errors on the page.
So what we are going to do, I define an error flag error flag, which would be false in the beginning.
So what we are going to do so first, if title is not going to try to load up so quickly, remove all
this.
So what we're basically trying to convey the idea that there can be multiple errors if title is not
a an error like this will to prove that error is an error, error message is what the title
should be and capital.
But this time, one thing I'm going to change that errors is an is an ad or what is a list don't spend.
Ed.
Message.
OK, so this is fine in the same way.
What I'm going to try to do that.
So here you can see that this is an extension to the producer total.
So what I'm trying to define it and define it, I guess the regular expression.
OK, and so basically, this arrogates is used to define the email address so you can see your dot symbol
with the symbols.
So what I'm going to do.
OK, so basically I have my email.
If not so before this, I need to define an import
import.
So this is a different library invited.
Do we use the regular expression?
So what do I have I computer to the library, recognize the email military, so.
If not drag X, sorry, I did not search, so searches used to determine the match that I expected to
take X.
Call my email, OK, if this happens, then what I'm going to do, yes, Aeroplan will remain through
a window into an arrest or upon error message will come.
But this time the error message would change.
The error message would be error messages, not a valid email address.
OK, so basically I'm trying to convey the idea that there's an error.
Sorry.
So I'll move this line.
If not, I.
OK, so basically I'm trying to convey that idea that if if title is one writer, operator error fragments
to error message with this and this will be appended in the error list.
OK, good.
Then I made a logical then I made it a condition with state logically that if this is not a match or
a search and then error flag will went through, an error message will be not a valid immolators and
this will be appended an error.
OK, ok.
New condition would be next condition if is error.
Error flag.
It's not.
Equal to through.
If a fly is not equal to truth, this is a third definition, but this is if its condition depends on
your logic, but how you can make them to be easy to make in such a way.
If error flag is not equal, to prove that there was no error means error.
Fact is not equal to true, then success and success is equal to form Sumathi.
OK, so now what I would do, I would render this to my form, to the estimate.
OK, but I'll give a quick overview.
If title is not going to take over upper then then it's not ready for such.
If it is not true then this return, then the request my phone brought to the table and taxes to my
dictionary.
So this would help me out in this.
So but before this I need to update my dictionary.
My dictionary is also a dictionary, my dictionary of error.
Is a little better flat and my dictionary of errors.
Is it is OK, this is fine.
So, uh, so I would make that I would, but so now this would render my dictionary to my phone, to
God.
OK, OK.
Before this, what we can do.
Now, I will move to my phone to read a statement.
So basically in advance, I've done this.
If, uh, if it is true, yes.
Or edit in errors, you need to print this error this fall.
And this is conditional.
OK.
So I would restart my server.
Both in my appearance over so when I make a request to my phone.
So here you can see an email has been added.
OK, I'll make a title best.
That's OK.
I'll keep this in lowercase best title test subject.
M. This is not an.
So here you can see there should be in capital and not a valid e-mail address.
OK, OK, I'll make this title though.
I'll make this in capital.
As I told.
Best
subject.
And test me of this time, the title is valid, but the email is not valid, so it should return only
this error that some default.
It's not a valid email address only.
So testator test subject.
The users are determined Broadcom.
So to form somewhere, so I I have gone through all the test cases, my phone has passed so that this
you can see how the logic works.
So basically in the temporary part, what I'm trying to do was if there is room for error, it errors.
So basically I move to my views.
What do I find here?
You can see my error was this error which I had made and this was the error flag.
So basically, even what you can do also bring.
My dictionary to sort of help you to get a better idea is a title that.
And Assman, so so it is not a valid immolators, OK?
And what it is your considered dictators like this, the errors has not editing error, not about individual
and terrorist group.
This is how you can work with this bill.
Thank you, guys.
Thank you so much.
So you can test with maltodextrin and it will help you to understand the logic part.
Thank you, guys.
I'll catch up in the next lecture.
Thank you.
Thank you so much.