Writing data and validations
In regard to the writing process, as I mentioned before, just implement MyAccount
and implement writeForm
of MyAccount
.
This is also quite long, so please refer to the source file 12_writing_data_and_validations/php/classes/MyAppMyAccount.php
.
The content of the process is simple; however, if you look at the PHP code, it looks pretty complicated. I'll try to explain it simply.
First, to return the associative array as a return value in the same way as the others, we have to set success
as true
and relay to the client that the writing process has finished normally.
At the beginning, there are places where we set the associative array with a key called errors
, then set a field name key inside and insert a message. This is the input check on the server side.
If you use Ext Direct, this completes the input check.
Under errors, put in the field name for the error target and just by entering the error message in there, the server side automatically displays a red frame....