How to validate when i am already inside a server action ! and not on the client side
Hi @Omar AbdElhadi ,
this note only refers to server side validation, you don't need to be on the client.
you want your data to be of a minimum quality, you don't want database errors to go off because it is not of good quality, but validation can go beyond just checking database level rules, it should ideally check all business rules that are applicable to your data, at a point on the server, close to and before going ahead with the create or update or ....
you should not rely on client side validation for this, for 2 reasons
Dorine
for further reading, see these articles from @Justin James
Thanks for reply , but this server action is called inside service , not inside client action , so how to solve it in that case ?
solve what ?
i dont have cleint action inside the service module ! all of them are server actions so how to fix it insider the server actions
Read previous answer again : this is in no way related to any client action, it is about validating ( i.e. checking correct value of) data on server side before going ahead with saving things in the database.