Wiredcraft / test-fullstack

6 stars 43 forks source link

natvet #19

Closed natvet closed 6 years ago

natvet commented 6 years ago

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 :)

flyingant commented 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:

  1. Please add the following fields with rules

    1. 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]
    2. Publish Date (Date Picker)[Cannot be blank and choose a proper react component]
    3. Description (Textarea)[Cannot be blank][the lenght of charactors should be less than 600][shoud avoid XSS attack]
    4. Author (Input field)[Cannot be blank][the lenght of charactors should be less than 20][shoud avoid XSS attack]
    5. Public (Select field)[Default value should be blank]
  2. Validate the form field before submit

  3. Display the error message below the field if validation is failed

  4. Make the submit form friendly and nicely. (A little more CSS work on it)

  5. (Advanced) Automaticly validation

  6. (Advanced) Integrate the validation feature to redux

Feel free to ask questions here.

natvet commented 6 years ago

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?

flyingant commented 6 years ago

Hi @natvet

(Advanced) Automaticly validation

The validation function will start when form input field changes.

natvet commented 6 years ago

Hi @flyingant,

thanks for answering. Then I believe this is implemented as well. Please have a look :)

makara commented 6 years ago

Hi @natvet,

It should be enough for us to take a decision. Thanks for the effort. We'll get back to you soon.

Closing.