1 00:00:02,220 --> 00:00:09,980 well this video because we are going to finish seeing how to create that app and that backend 2 00:00:09,980 --> 00:00:16,980 already in reality it is already operational we already have everything we wanted the authentication the tasks 3 00:00:16,980 --> 00:00:29,460 ok and now what you can imagine or what you want to do against an app and well, more or less from 4 00:00:29,460 --> 00:00:38,439 this idea you could develop it is worth then this last video we are going to dedicate it a 5 00:00:38,439 --> 00:00:46,899 little to the validation is because because in the end we have used the mongoose skin that 6 00:00:46,899 --> 00:00:53,200 then we have converted it to a model and we have validated the data that came or that we were going to 7 00:00:53,200 --> 00:01:00,340 send it to mongo ok and we are going to save that document with those data to mongo 8 00:01:00,340 --> 00:01:09,019 then we have used those validations to validate those data that go to the database ok but 9 00:01:09,019 --> 00:01:19,099 well we can do other types of validations or also good good if it is that I was thinking 10 00:01:19,099 --> 00:01:29,010 the middleware is that in the end we have also gone against the database so we have 11 00:01:29,010 --> 00:01:38,489 other frameworks to make validations, they are worth I have here open on the web page we go in the 12 00:01:38,489 --> 00:01:46,629 browser to see some, then, for example, we have the spread validate, it is worth the spread 13 00:01:46,629 --> 00:01:53,590 validate you have here all the documentation that is very similar to how we have been doing it 14 00:01:53,590 --> 00:02:01,450 we are worth we put the validation here it is putting it inside the network is good this one 15 00:02:01,450 --> 00:02:09,009 seems to me more cumbersome to use ok we can use it with javascript you have here the 16 00:02:09,009 --> 00:02:15,629 documentation and it would be to follow it as always start well all the history we have another one that 17 00:02:15,629 --> 00:02:22,110 that this one looks more like the one we have been using then we can tell it to create a 18 00:02:22,110 --> 00:02:31,110 scheme, that is, we import the joy first, that is, this would be, you know, the import 19 00:02:32,229 --> 00:02:42,789 and joy from joy that this requires an npm and I and it is worth because I belong to or it is within 20 00:02:42,789 --> 00:02:50,229 of the npm then we can install it like this I think it went to another one that was holiday or something 21 00:02:50,229 --> 00:02:56,469 like that now it can be used from different frameworks, that is, from different platforms, 22 00:02:56,469 --> 00:03:06,789 but in the end you see that it has to be a well that the fields are worth the keys that it is a 23 00:03:06,789 --> 00:03:12,729 type of string that is also alphanumeric a minimum a maximum if it is required then this is very 24 00:03:12,729 --> 00:03:21,189 similar to the one we have been using ok and then what it does is that the scheme 25 00:03:23,189 --> 00:03:31,009 you say with use name ok we put this scheme then we pass the validate ok and it validates 26 00:03:31,009 --> 00:03:41,330 cada una de las opciones cada uno de los claves que hemos ido pues configurando en el esquema 27 00:03:41,330 --> 00:03:46,830 bueno pues es otra forma de validar los datos y es otro framework que tenéis aquí vale y que 28 00:03:46,830 --> 00:03:55,770 se podría utilizar vale de hecho yo creo que este sí se utiliza bastante bueno a mí el que 29 00:03:55,770 --> 00:04:02,430 we are going to use now, the one that interests me is the zot, it is worth COD, then in the COD 30 00:04:03,449 --> 00:04:11,069 we have, for example, here I have open in the types of fields that are going to be of type string, okay, 31 00:04:13,409 --> 00:04:20,709 we are going to put different options, then notice that here it is doing it with a point, 32 00:04:20,709 --> 00:04:25,990 then you put the z first point string the z which is how we call it now we are going to see it 33 00:04:25,990 --> 00:04:32,410 when we import the point string because that field is of type string and then we can go 34 00:04:32,410 --> 00:04:40,410 chaining that it has a minimum a maximum a given length is worth that it is of type e-mail well 35 00:04:40,410 --> 00:04:48,769 you have here different options and all these we could go using it is worth then this 36 00:04:48,769 --> 00:05:03,910 zot allows us to do many many checks and well, I think it is the one that is most used now, it 37 00:05:03,910 --> 00:05:11,589 allows us to use it with ts and with js, ts which is another language is the type script 38 00:05:12,910 --> 00:05:19,149 and javascript and js which is javascript, then well, we have here how it would be 39 00:05:19,149 --> 00:05:30,790 is worth the installation from npm npm the install or the thought once you are we import z from 40 00:05:33,829 --> 00:05:41,589 well here with that we put front it will already be worth it and well it would be to follow this is the 41 00:05:41,589 --> 00:05:47,769 option it would be to follow these steps ok then we are going to make an example but 42 00:05:47,769 --> 00:05:52,509 that you know, as always, that the technical documentation you have here and you can do several 43 00:05:52,509 --> 00:05:59,269 several things, it is worth then we are going to play almost everything is with a string type so 44 00:05:59,269 --> 00:06:07,149 well, we are going to play with that, then we go back to our code, 45 00:06:08,889 --> 00:06:19,339 okay, well then, what are we going to start doing, we are going to come to our 46 00:06:19,339 --> 00:06:25,279 skin folder that we had not used yet we have made the models using the mongoose 47 00:06:25,279 --> 00:06:32,980 ok well let's go against skin and we are going to create a file here that we are going to call it 48 00:06:32,980 --> 00:06:40,040 because as we are going to make a scheme to control the data for example of the authentication 49 00:06:40,040 --> 00:06:50,079 Well, to follow the nomenclature a bit, we are going to put out skin.js, it is worth j s, which is what 50 00:06:50,079 --> 00:06:56,720 we are with, we are going to use zot, then as we are going to use zot, the first thing we need 51 00:06:56,720 --> 00:07:16,750 is to install it, then npm and zod, okay, it's already in a package, okay, what is the second thing we do, import 52 00:07:18,350 --> 00:07:27,930 z from z, okay, we already have it, okay, 53 00:07:29,790 --> 00:07:45,350 well, we are going to create a validation scheme, for example, for when we register a 54 00:07:45,350 --> 00:07:54,069 data, it is worth, for example, for the registration that we have not put the verification, we are going to 55 00:07:54,069 --> 00:08:00,949 put it here in a validation of data that we do with zot and for example for the login 56 00:08:02,750 --> 00:08:10,930 then this I am going to close out skin this I do not want it at all this I do not want it at all and this 57 00:08:12,170 --> 00:08:22,810 is worth then we are going to create ourselves as always at the end the scheme is always more or less the 58 00:08:22,810 --> 00:08:26,970 same is worth in this case it is to register skin 59 00:08:28,889 --> 00:08:37,149 ok ok then here before we put the mongoose point skin now what we are going to put is a z point 60 00:08:40,210 --> 00:08:49,850 ok what we are going to create is an object of thought which is what we are going to the fields that we are going to 61 00:08:49,850 --> 00:09:00,669 validate here, for example, the username, we are going to validate the email, we are going to validate 62 00:09:02,669 --> 00:09:09,950 password and I think that with that we are worth it, then if we need something else, 63 00:09:09,950 --> 00:09:18,730 we are going to put it, it is worth the username, the first thing I am going to say is z very sorry 64 00:09:18,730 --> 00:09:29,889 certain point the type that I am going to save in that data is string string ok this is the string type 65 00:09:29,889 --> 00:09:36,129 ok first always say the type that this instead of putting the type string we put z point 66 00:09:36,129 --> 00:09:46,029 string ready what is what we do now here we are passing the different options that we want 67 00:09:46,029 --> 00:09:54,850 that it is fulfilling ok and what are the ones we have on the website for example the username we want 68 00:09:54,850 --> 00:10:04,269 it to be a required field ok then we tell it if it requires terror ok if there is 69 00:10:07,149 --> 00:10:13,789 if there is a required script under error that means that this field is required we can 70 00:10:13,789 --> 00:10:24,279 say, for example, because it is a message, we tell you if there is an error that is in white, 71 00:10:24,279 --> 00:10:29,100 because we can tell it username 72 00:10:33,500 --> 00:10:44,000 username is mandatory, it could be putting more fields, for example, 73 00:10:44,000 --> 00:10:54,240 after the point I could put here, for example, the point 74 00:11:02,899 --> 00:11:03,559 well 75 00:11:10,080 --> 00:11:15,240 if minimum is worth it could be concatenating here, for example, tell it that the minimum 76 00:11:15,240 --> 00:11:24,620 for the login is the same, for example, that there are six, that it is 77 00:11:28,620 --> 00:11:36,860 a message here, okay, if it is not fulfilled, if an error occurs, the message and we say 78 00:11:36,860 --> 00:11:53,480 the username must have at least six letters, for example, this is a comma, 79 00:11:55,220 --> 00:12:05,340 okay, and here, well, I would finish it, this is in my first field of validation, username, I tell you 80 00:12:05,340 --> 00:12:12,899 that is to say of type z string is worth this type string and that fulfills these two fields 81 00:12:12,899 --> 00:12:19,679 one that has been required and another that has this minimum is worth a minimum of six characters here 82 00:12:19,679 --> 00:12:29,090 we can also put another field to see that I look at it in the documentation that was the 83 00:12:29,090 --> 00:12:44,950 here another option that was for example the invalid is the invalid type error 84 00:12:46,509 --> 00:12:59,070 what is the username must be of type string for example all this because what I tell you I 85 00:12:59,070 --> 00:13:05,389 I am taking it out of the documentation then it is a type of string that has to 86 00:13:05,389 --> 00:13:11,490 fulfill the string that is required and that is of type character that has a minimum of 87 00:13:11,490 --> 00:13:16,350 6 characters 6 characters if this is not going to come out ok and now I start with the 88 00:13:16,350 --> 00:13:22,250 email the email well here we put two points and 89 00:13:22,250 --> 00:13:25,730 we do exactly 90 00:13:25,730 --> 00:13:38,879 then the same z point string parenthesis 91 00:13:38,879 --> 00:13:43,879 ok and come on let's go with the email then first because I have required 92 00:13:43,879 --> 00:13:48,259 it is worth between those required error 93 00:13:48,460 --> 00:13:51,559 and mail 94 00:13:51,559 --> 00:13:57,000 is a mandatory field 95 00:13:59,340 --> 00:14:08,200 ok in this case the email I want it to meet the email condition 96 00:14:08,200 --> 00:14:12,259 ok this is going to check me for example because it has an arroba that has a 97 00:14:12,259 --> 00:14:20,120 point that kind of things then here we are going to pass this and if not if it detects 98 00:14:20,120 --> 00:14:24,480 some type of error then the message that is 99 00:14:28,440 --> 00:14:40,440 we are going to put email incorrect for example ok and now we go to the password the password we are going to say 100 00:14:42,259 --> 00:14:57,080 z point string ok we are going to pass the option that is required ok if you do not send it to us we are going to put 101 00:14:59,960 --> 00:15:20,450 the password the field password is ok what else can we put because as we have put before 102 00:15:20,450 --> 00:15:28,730 for example that it has a minimum of 6 characters, and if you are not going to return the message to me, 103 00:15:32,330 --> 00:15:35,240 a message that is 104 00:15:37,240 --> 00:15:50,519 password must have at least 6 characters, I am going to leave this like this, I am going to remove it from here, I like it more 105 00:15:50,519 --> 00:15:56,580 only in the password at the end that as we have users who were miguel and it was pedro because it is good 106 00:15:56,580 --> 00:16:05,000 then I am going to remove it from there I am going to leave it here ok and we would already have it here is the 107 00:16:05,000 --> 00:16:11,940 dot and comma and we would already have the register ok these would be those fields that would accompany 108 00:16:11,940 --> 00:16:19,759 that validation of these fields ok what else have we said that we are going to do the login 109 00:16:19,759 --> 00:16:37,389 sport with login skin this is going to be equal to z point object ok and we continue then now in the login that 110 00:16:37,389 --> 00:16:47,590 fields we are going to validate it can be the email not what we sent and the password because then I had 111 00:16:47,590 --> 00:16:54,970 with those two fields they will be the ones that we sent and with that it was worth it, then the email is going to be 112 00:17:03,620 --> 00:17:04,660 point 113 00:17:06,180 --> 00:17:17,569 string ok the email is this point this has to be required if they do not send it to us 114 00:17:17,569 --> 00:17:28,579 we pass email it is mandatory it is worth I am not going to pass anything else here 115 00:17:30,759 --> 00:17:36,359 the password that is of the type string also 116 00:17:41,440 --> 00:17:43,299 the same is mandatory 117 00:17:43,299 --> 00:18:12,329 password, it is mandatory, mandatory, what else, and we can pass the other one, the minimum, 118 00:18:12,329 --> 00:18:23,180 that we have not passed before minimum and we tell him of 6 and the message of the keys 119 00:18:35,960 --> 00:18:42,990 6 characters is worth this would be here 120 00:18:45,990 --> 00:18:51,250 and here the comma point is worth we already have our two functions we are going to give a format to 121 00:18:51,250 --> 00:18:57,549 all this is already valid, we already have our two schema type functions in which we have 122 00:18:57,549 --> 00:19:05,990 validated these fields, okay, what else do we have to do, well, we have to use this scheme 123 00:19:05,990 --> 00:19:14,809 somewhere, okay, then we are going to do the same as we did before, we are going to make a middle world in 124 00:19:14,809 --> 00:19:21,650 which these schemes are validated then we are going to come to me the web we are going to create a 125 00:19:21,650 --> 00:19:26,049 new file that we are going to call for example the bali editor 126 00:19:30,289 --> 00:19:32,750 I do not know how you want neither of the web 127 00:19:32,750 --> 00:19:48,890 for example, okay, okay, what is the function I am going to use here, well, we are going to put a sport 128 00:19:48,890 --> 00:19:54,769 with us to be able to use it later, okay, here I am going to call it, okay, date 129 00:19:54,769 --> 00:20:08,690 vale y esto va a tener un parámetro de entrada que es un esquema vale va a ser un esquema 130 00:20:13,970 --> 00:20:18,009 esto va a tener un parámetro de entrada que es un esquema 131 00:20:18,009 --> 00:20:42,890 and we also need as input parameters, we are going to put the REC and the RES, okay, 132 00:20:42,890 --> 00:20:50,930 here we have imported this, when I am not going to use the scheme, it is because I have put it in 133 00:20:50,930 --> 00:21:02,539 capital letters, here we are going to put it in lowercase, I am going to remove this, okay, I am going to leave it 134 00:21:03,079 --> 00:21:22,079 What parameters do we need here? Well, it's a middleware, so we need the rec, the res, the request, the response and the next, remember the next, we always need the next too. 135 00:21:22,079 --> 00:21:30,779 ok and here we start with our arrow function as always this is a bit strange because there are 136 00:21:30,779 --> 00:21:36,079 like two sets of parameters that we are going to send it then these parameters are going to enter the 137 00:21:36,079 --> 00:21:42,599 valley date to the valley of the skin the stream because we need that scheme and within that it is worth it is 138 00:21:42,599 --> 00:21:50,279 how to make a command pipe, it is worth within that the network that the recent ex is worth and here 139 00:21:52,099 --> 00:21:59,720 what we are going to put is because as always as we are going to validate because the trail in case 140 00:21:59,720 --> 00:22:05,359 the track is worth within the trail we are going to tell it that 141 00:22:08,200 --> 00:22:08,740 it is more 142 00:22:10,220 --> 00:22:12,519 worth in thought 143 00:22:15,660 --> 00:22:23,640 the parameter that is used to validate is the parser, it is worth then here I am going to put the 144 00:22:23,640 --> 00:22:38,099 point scheme and this does not catch me this does not catch me ok then I understand that this if we put it 145 00:23:03,319 --> 00:23:10,960 we are going to see ok although here I put the point parse 146 00:23:12,759 --> 00:23:17,500 and I am not recognizing this point parse is because here I am not passing it 147 00:23:17,500 --> 00:23:23,799 still to this entry parameter I am not passing the scheme that we have created in out is that in 148 00:23:23,799 --> 00:23:31,119 dot j is worth at the time of passing it yes that it recognizes the pass point and then it is when it is 149 00:23:31,119 --> 00:23:36,880 validated, it is worth if you see in the documentation the pass point is when we validate that scheme, that is, it 150 00:23:36,880 --> 00:23:46,740 would be something like the mongoose model, it is worth something similar in this case I use the pass and in the pass 151 00:23:46,740 --> 00:23:52,680 lo que le vamos a pasar es el rey punto body los datos que le estamos pasando desde el body vale 152 00:23:53,940 --> 00:24:03,119 vale si aquí hay algún tipo de error esto lo que haces es parar el servidor vale parar 153 00:24:03,119 --> 00:24:10,519 bueno pues luego lo para todo entonces ya directamente lo pararía y controlaríamos 154 00:24:10,519 --> 00:24:17,500 this here with the error and here what we would put would be a 155 00:24:18,519 --> 00:24:32,309 point status the 400 voucher and here we could pass a json with error 156 00:24:32,309 --> 00:24:42,130 and here if everything is fine, which is what we call the next, then that is why I use the 157 00:24:42,130 --> 00:24:50,369 record res and the next this would be my function to validate that scheme, so what else do we have to 158 00:24:50,369 --> 00:24:59,529 do well now this middleware we have to put it in the routes where we need it that we have 159 00:24:59,529 --> 00:25:08,410 dicho que va a ser en por un lado en el de aquí en el de registrarse entonces le 160 00:25:08,410 --> 00:25:14,829 vamos a poner aquí bueno primero lo vamos a importar 161 00:25:14,829 --> 00:25:22,130 vale entonces vamos a poner el import le hemos llamado 162 00:25:22,130 --> 00:25:26,829 validate is that it is worth import 163 00:25:28,529 --> 00:25:34,890 validate is that from and he already puts it here all careful with the js it is worth I always tell you the same thing 164 00:25:34,890 --> 00:25:47,329 we would already have it then here we are going to put validate is that skin is worth and I am going to pass it 165 00:25:47,329 --> 00:25:53,269 a value and the value is the scheme that we have created in our scheme so that 166 00:25:53,269 --> 00:26:01,130 we also have to bring it ok then we are going to import 167 00:26:04,089 --> 00:26:12,329 for the two registers and so on and we are going to import the login is that it is worth 168 00:26:12,329 --> 00:26:19,349 I already bring them both, it is worth controlling well that it is with the js it is worth here we are going to 169 00:26:19,349 --> 00:26:26,009 pass it we are in the register because the register is king and here in the login we are going to pass it 170 00:26:28,089 --> 00:26:37,329 valid is that we are going to pass the login it is worth and we would already have it in principle it would already be 171 00:26:37,329 --> 00:26:44,769 y vamos a probarlo vale entonces nos vamos a nuestro cliente vamos a borrar este que no me 172 00:26:44,769 --> 00:26:53,650 acuerdo de qué es y empezamos a hacer vale estamos con el register y el local vale entonces vamos a 173 00:26:53,650 --> 00:27:04,990 crearnos una consulta nueva que va a ser un post vamos a meter aquí localhost lo tenemos aquí está 174 00:27:04,990 --> 00:27:13,430 register ok and we are going to leave the body in white and I send this ok this gives me 175 00:27:13,430 --> 00:27:20,109 an error because because the connection was rejected I have nothing to raise then npm 176 00:27:22,049 --> 00:27:22,849 a of two 177 00:27:26,930 --> 00:27:29,309 that there is some type of problem 178 00:27:29,309 --> 00:27:47,440 router post validate is that this is wrongly written and this is out validate 179 00:27:49,319 --> 00:27:52,079 validate is that it is already fine 180 00:27:55,299 --> 00:27:56,160 then 181 00:27:56,160 --> 00:28:04,200 we launch our database that we already have this that we already have it all right 182 00:28:04,200 --> 00:28:13,319 ok if I give it to the sense ok it returns me this this good this data collection 183 00:28:15,559 --> 00:28:21,160 ok then yes that the code is giving me is 184 00:28:21,160 --> 00:28:32,460 is invalid, it is expectant because it is a required field, username is mandatory, 185 00:28:32,460 --> 00:28:40,440 it is giving me everything but in a post-fee format, then we can fix that 186 00:28:42,259 --> 00:28:46,740 if we come to the validator and in the return instead of returning only the error 187 00:28:46,740 --> 00:28:57,119 as we map is that type of errors is worth then if you look here are different 188 00:28:57,119 --> 00:29:03,500 collections then I can map within the error variable the field that I want me to return 189 00:29:06,460 --> 00:29:13,779 for each of these documents is worth then I what I want me to return is the message the 190 00:29:13,779 --> 00:29:18,440 only thing I want you to tell me is that the email is a mandatory field that the username is mandatory that 191 00:29:18,440 --> 00:29:28,059 is worth that type of data then we can map all this set of errors data 192 00:29:28,059 --> 00:29:38,180 that are within error and save it within the error and that it only displays the error for this 193 00:29:38,180 --> 00:29:47,400 how do I do it how do I do that mapping here I am going to say well all the arrangement that you are 194 00:29:47,400 --> 00:29:54,119 sending me with the entire collection of documents is worth that we are going to call errors 195 00:29:55,579 --> 00:30:00,940 ok then I am going to tell him ok you take me you visualize the error 196 00:30:00,940 --> 00:30:18,059 of errors this is wrong this I am missing keys we are going to see this we are going to put first 197 00:30:18,059 --> 00:30:22,660 because we are going to map it is worth and if we are going to map it 198 00:30:22,660 --> 00:30:37,690 yes we are going to pass this I am going to say in the error field we are going to put the key that does not give me 199 00:30:37,690 --> 00:30:46,029 errors in the error field what I want you to save me is from error point errors of all 200 00:30:46,029 --> 00:30:56,849 los que me estás enviando quiero que me map es vale le pongo el punto más y le digo guárdame en error 201 00:30:59,410 --> 00:31:13,319 el error punto vale y esto ya estaría vale entonces que le estoy diciendo vale en el jota son quiero 202 00:31:13,319 --> 00:31:20,819 que guardes en error vale en la variable que le hemos puesto en el cat quiero que me guardes el 203 00:31:20,819 --> 00:31:29,579 resultado de mapear todos los errores que están dentro de el arreglo de error vale error es el 204 00:31:29,579 --> 00:31:35,480 que me devuelve todos esos errores y entonces esto me lo mapea así como me lo vas a mapear 205 00:31:35,480 --> 00:31:40,880 como voy a usar la función map le voy a decir vale pues entonces de cada uno de los errores 206 00:31:40,880 --> 00:31:47,299 that are inside the arrangement the only thing I want is the message ok and this is the one that I pass 207 00:31:47,299 --> 00:31:53,640 to this error variable and that is the one that is going to visualize me ok in principle if everything is 208 00:31:53,640 --> 00:32:00,279 fine then we come here we re-launch this ok and this does make more sense the error and then 209 00:32:00,279 --> 00:32:06,319 you have different values ​​which is the user is mandatory the email is mandatory the field 210 00:32:06,319 --> 00:32:14,500 password is mandatory, it is worth then this because for us it makes sense in the from this in 211 00:32:14,500 --> 00:32:22,200 an easy way with the mapping we do it in the backend and we already send this json clean to the from 212 00:32:22,200 --> 00:32:28,519 and it makes sense it is worth if here now we take and we tell him well now that as we are 213 00:32:28,519 --> 00:32:34,180 registering then the username I am going to tell you that it is 214 00:32:36,839 --> 00:32:55,859 because I myself is worth the pass the email I am going to tell you that it is good this is wrong the quotes 215 00:32:57,839 --> 00:33:06,250 here we are going to put quotes ok the email we are going to say that it is only male so that 216 00:33:06,250 --> 00:33:17,289 there is an error and in the password we are going to say that it is 1 2 3 4 without a number not a string 217 00:33:17,289 --> 00:33:23,049 ok then here we have different errors this we give it to send and it tells us ok the 218 00:33:23,049 --> 00:33:33,789 errors the email is incorrect and in the password we are expecting to ask for a string ok ok 219 00:33:33,789 --> 00:33:43,029 this is ugly then we are going to take in the scheme that we have created in the password 220 00:33:44,690 --> 00:33:51,440 and we have six characters 221 00:33:57,380 --> 00:33:59,420 I think the message is a bit ugly 222 00:33:59,420 --> 00:34:12,420 Incorrect email, password is receiving a number, it says that in the password we are receiving a number and the type we have said that it is 223 00:34:12,420 --> 00:34:25,420 Where is this one? No, sorry, in the password, we are going to put a value that is the invalid 224 00:34:25,420 --> 00:34:42,420 Invalid type error, password should be of the string type, that's it, it's better that way. 225 00:34:42,420 --> 00:34:53,420 If now we come, new request, password should be of the string type, okay, this is easier for us. 226 00:34:53,420 --> 00:35:00,139 ok ok then here in the in the email we are going to put an arroba and we are going to put 227 00:35:00,139 --> 00:35:06,559 giving ok I give send again it gives me the same error again because because here it 228 00:35:06,559 --> 00:35:09,679 checks that there is an arroba and that it also checks that there is a point 229 00:35:11,019 --> 00:35:18,280 worth the point with sense now the email gives it to me well and now what I need is the password 230 00:35:18,280 --> 00:35:25,400 then the password now does not have six characters of the password must have 231 00:35:25,400 --> 00:35:32,940 as a minimum six characters 1 2 3 4 5 and 6 232 00:35:32,940 --> 00:35:36,880 it is worth giving to the center and 233 00:35:36,880 --> 00:35:46,050 and this has been canceled this now call it 234 00:35:46,050 --> 00:35:57,940 will have canceled it because as I am like this the database and it is connected 235 00:35:59,920 --> 00:36:01,340 then in use 236 00:36:10,000 --> 00:36:11,400 we are going to see what happens 237 00:36:11,400 --> 00:36:33,079 or register and here once it fulfills everything I pass it is wrong it is the next 238 00:36:34,539 --> 00:36:42,500 ok I was missing those parentheses ok we come back here I am going to stop this you want to finish the 239 00:36:42,500 --> 00:36:52,320 work because I am going to say that yes and I will launch it again then we already have everything 240 00:36:52,320 --> 00:36:59,179 well I give it to the center and it has already saved me, it has already saved me my new use, sorry, it is down here the 241 00:36:59,179 --> 00:37:06,800 new user, I already have both, okay, we already have Mario here and you have all the information 242 00:37:06,800 --> 00:37:13,960 the same as before then if I leave you a little as an exercise 243 00:37:14,340 --> 00:37:17,059 well the 244 00:37:17,059 --> 00:37:24,380 the login issue would be the same, that is, if I leave this blank, I pass it 245 00:37:24,380 --> 00:37:33,329 a post and we pass the login here, it will validate me exactly the 246 00:37:33,329 --> 00:37:41,949 same the email is mandatory the ok then I can put the email here 247 00:37:41,949 --> 00:37:46,550 I can put mario 248 00:37:46,550 --> 00:37:52,030 and I can put the password ok but let's go that it is the same with 249 00:37:52,030 --> 00:37:58,489 two three four five and six I give it to the send it tells me expect receive a number 250 00:37:58,489 --> 00:38:08,969 ok for the same as before the email I have not validated it well this of the email the email I have only 251 00:38:08,969 --> 00:38:13,670 said that it is required I have not put it later I have not passed it for example this that would be 252 00:38:13,670 --> 00:38:20,630 better more correct ok good but it is a bit for not doing this eternal ok it is required 253 00:38:20,630 --> 00:38:30,070 pues el email le vamos a poner bien arroba dando puntocom y el password que nos dice que es un 254 00:38:30,070 --> 00:38:39,590 número y lo que quiere es un string vale esto le doy al send y ya me ha creado todo todo bien vale 255 00:38:39,590 --> 00:38:45,070 entonces si os dejo un poco como ejercicio a vosotros hacer lo mismo una validación a través 256 00:38:45,070 --> 00:38:53,309 of the tasks, it is worth using the documentation to put different validation fields 257 00:38:53,309 --> 00:38:58,949 that have been required that if the value is not correct, then that I know that the message 258 00:38:58,949 --> 00:39:07,670 maps well that only the error messages come out or the key that you want is 259 00:39:07,670 --> 00:39:17,510 ok good that you play a little with all that with the tasks and here we end with the bake and 260 00:39:17,510 --> 00:39:27,050 with the back ok with the back end with the app now what I am going to do is dockerize this app 261 00:39:27,050 --> 00:39:34,190 to be able to use it from anywhere using docker desktop a greeting see you later