Hi Khasayar,
You can validate those fields either by using table methods or form methods.
In table methods, write the code in ValidateWrite method - if fields is not entered with any value means, system will throw the error.
e.g. if (!this.FieldName)
{
ret = checkfailed("Field must be filled in");
}
otherwise, you can write the same code in form validatewrite methods by using DS name.
if you want to make the field as mandatory means (red color underline indication in form), based on certain condition - you can go through by form methods.
Thanks,