Process comment and post functionality
thamudi opened this issue · comments
As an API I need to receive a comment and a post for me to process a single comment for hate speech.
The format I am looking for should follow this pattern:
{
"comment": "some comment here",
"post": "the original post text",
},
Technical requirements:
- Once the user fills the required fields the data needs to be sent over to the server proxy and forwarded to the API call.
- Of course, the data needs to be also validated on the server side in case the user finds a way to bypass the frontend check.
- The checks we are looking for are the following:
- Allow text string and numbers.
- Disallow URLs (use regex).
- Disallow emails (use regex).
- Disallow only numbers (use regex).
- Disallow empty fields for either for the comment or the post field.
Issue Checklist:
- Add a validator for the comment and the post input fields.
- Add a request handler.
NOTE: All request and process responses should be properly reflected on the dashboad
page as toast alerts.