There are 2 ways to bypass without a custom setting:
To bypaas validation rule without custom setting, you can create a custom field(checkbox) on 'User' and you can check that field's value to bypass for particular users.
you can create a checkbox field on the Sobject and as per it's value, validation rule can be bypassed for particular records.
it's not possible via trigger because in execution cycle, validation rules are executed before the trigger executes.
- To bypaas validation rule without custom setting, you can create a custom field(checkbox) on 'User' and you can check that field's value to bypass for particular users.
- you can create a checkbox field on the Sobject and as per it's value, validation rule can be bypassed for particular records.
it's not possible via trigger because in execution cycle, validation rules are executed before the trigger executes.