2019-07-13 11:35:57 +02:00
|
|
|
<script>
|
2020-02-03 10:50:30 +01:00
|
|
|
export let errors = []
|
2019-07-13 11:35:57 +02:00
|
|
|
|
2020-02-03 10:50:30 +01:00
|
|
|
$: hasErrors = errors.length > 0
|
2019-07-13 11:35:57 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
{#if hasErrors}
|
2020-03-25 17:57:04 +01:00
|
|
|
<div uk-alert class="uk-alert-danger">
|
2019-07-13 11:35:57 +02:00
|
|
|
{#each errors as error}
|
2020-03-27 17:58:32 +01:00
|
|
|
<div>{error.field ? `${error.field}: ` : ''}{error.error}</div>
|
2019-07-13 11:35:57 +02:00
|
|
|
{/each}
|
2020-03-27 17:58:32 +01:00
|
|
|
</div>
|
2020-03-25 17:57:04 +01:00
|
|
|
{/if}
|