This is not only legal in Islamic countries its the duty of the husband/father