Now that we have added the clients side validations, I want to show you one more thing.
Right now we have the default message that is being displayed right now, we have the default message
that is being displayed.
On top of that, you can see right now in display order, that is no space that is available and it
is the same with the validation.
The reason behind this is if they go to a category model, you can see that's the property name and
that is exactly what is being displayed.
So if they want to display something that is not the same as property need, we have display name here,
which is inside component model.
And here we can just give whatever name we want to display.
So let's add a space there, and it would correct that automatically.
Let's run this and give that a try.
Let's go to our category create category, and this time you'll see an ad as we have a space labels,
we have a space in perfect looks good.
If you go on the official documentation, there are quite a few data annotations that you can use.
We see that acquired one that we saw.
We also have a range attribute.
I would point to all of them.
You can explore them when you want.
You can see the display attributed to be used.
So let's just try one more, which is the range attribute that specifies a range for a field.
So let me just close this, and we stopped the application inside our display order.
We will add a range attribute, and here we have a minimum and maximum value.
So let's say minimum is one, maximum is 100.
So now if the display model is not in the range, it will give an error message like the error messages
that we see on the screen with validations, but also customizable.
So with range if they want some other error message.
We have that property right here and we can give a custom error message, but they have our custom error
message as display order must be between one and only with two exclamation.
Let's run our application.
And see that in action.
Let's head create, we have our required one.
Let me add something more than 100.
And you can see it directly displays our custom validation.
With that, you can see everything is working as expected.
And we saw a custom error messages, a range validation and how to use display mail inside or create
view, I will hide or comment the validation summary because we don't want that right now.
The inline validations are sufficient.
Let me go back and remove the debunking point.
Everything looks good so far from the next video.
We want to work on editing and deleting our category.