Closed natvet closed 6 years ago
Hi @natvet, This is Mayi and I reviewed your code recently. You are doing well and I would like to challenge a little bit in order to learn more about you.
Please try to build a form validate function by yourself (not third part lib). And I hope you could fullfill the functionality with the requirements below:
Please add the following fields with rules
- Title (Input filed) [cannot be blank][the lenght of charactors should be less than 60][Cannot be the same to exsit one][shoud avoid XSS attack]
- Publish Date (Date Picker)[Cannot be blank and choose a proper react component]
- Description (Textarea)[Cannot be blank][the lenght of charactors should be less than 600][shoud avoid XSS attack]
- Author (Input field)[Cannot be blank][the lenght of charactors should be less than 20][shoud avoid XSS attack]
- Public (Select field)[Default value should be blank]
Validate the form field before submit
Display the error message below the field if validation is failed
Make the submit form friendly and nicely. (A little more CSS work on it)
(Advanced) Automaticly validation
(Advanced) Integrate the validation feature to redux
Feel free to ask questions here.
Hi @flyingant,
thank you for your feedback! I've implemented the features you mentioned in your comment. I'm only not sure whether this one is done:
(Advanced) Automaticly validation
Could you clarify what do you mean by automatic validation here?
Hi @natvet
(Advanced) Automaticly validation
The validation function will start when form input field changes.
Hi @flyingant,
thanks for answering. Then I believe this is implemented as well. Please have a look :)
Hi @natvet,
It should be enough for us to take a decision. Thanks for the effort. We'll get back to you soon.
Closing.
Here is my attempt to complete the task with my first ever NodeJS server. The online demo does not work exactly as expected not being able to update the static JSON file used on server. My intuition is that integrating a proper database would solve the problem but I need to investigate further. It works fine locally though. As you can see, I haven’t touched the testing part as I’m not really familiar with this topic yet but I’m putting it on my list to learn. Looking forward to know your feedback :)