Ajax Error Service
This commit is contained in:
parent
9496de21d9
commit
689ea55bed
2 changed files with 19 additions and 7 deletions
|
@ -1,7 +0,0 @@
|
|||
export default function ajaxErrorNew(error, flash) {
|
||||
flash.clearMessages();
|
||||
error.errors.forEach((error) => {
|
||||
const source = error.source.pointer.split('/');
|
||||
flash.error(`${source[source.length-1].replace(/([A-Z])/g, ' $1').capitalize()} - ${error.detail}`);
|
||||
});
|
||||
}
|
Reference in a new issue