Contrary to popular belief, editing documents online can be hassle-free. Sure, some file formats might seem too hard with which to deal. But if you get the right solution, like DocHub, it's easy to edit any file with minimum effort. DocHub is your go-to solution for tasks as simple as the ability to Annotate Mandatory Field Title For Free a single document or something as intimidating as dealing with a huge stack of complex paperwork.
When considering a tool for online file editing, there are many solutions on the market. However, not all of them are powerful enough to accommodate the needs of people requiring minimum editing capabilities or small businesses that look for more advanced tools that enable them to collaborate within their document-based workflow. DocHub is a multi-purpose service that makes managing paperwork online more simplified and smoother. Try DocHub now!
In the signup form, we need to make the name field mandatory. We will start implementing this validation. First let me include the error message that needs to be displayed when the field is empty. In app.component.html, I am including a div tag with text as Name field is required. This is the message that will be shown when the field is empty. It would be good if we can apply some styling on this message to indicate that it is an error message. We are going to apply some styling with smaller font in red color. To apply styling, I am including the div tag with class attribute having value as error. Now let us define the styling for the error class in app.component.css. In app.component.css, I am including error class with font-size as 0.6rem and color as red. I am saving all the files using shortcut key. After the page reload, we can see the error message displayed. The label, form element and message are close to each other, let us apply some spacing in between.