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