$val->add_field('some_field', 'Test field', 'required');To set custom message you can do next:
$val->set_message('required', ' The field :label is required, please type if');
It looks like you're new here. If you want to get involved, click one of these buttons!