1.0.0 • Published 5 years ago

bootstrap-vue-laravel-form v1.0.0

Weekly downloads
5
License
MIT
Repository
-
Last release
5 years ago

Vue Laravel Form

A form component built with bootstrap that works with Laravel validation.

Example use

    import VForm from 'bootstrap-vue-laravel-form'
    
    export default {
        components: {VForm},
        data()
        {
            return {
                input: {
                    name: null,
                    message: null
                }
            }
        },
        methods: {
            handleSubmitted()
            {
                alert('woot!')
            }
        }
    }
    <v-form
        :model="input"
        action="/submit/url"
        method="PUT"
        @submitted="handleSubmitted">
        <template scope="{ error, errorState }">
             <b-form-input 
                v-model="name"
                :state="errorState('name')"
                :error="error('name')"
            />
            <b-form-textarea 
                v-model="message"
                :state="errorState('message')"
                :error="error('message')"
            />
        </template>
    </v-form>

Props

NameDefaultRequiredDescription
methodPOSTThe form submit method.
actionrequiredThe URL to submit the form to
model{}The payload model. Will be used as the payload for submission.
success-messageSuccess!The message to show the user on submission.
success-labelSubmitThe submit button label
validateA custom validation function.

Events

NameProvides
invaliderrors
errormessage
submittedresponse

Validation scopes

NameDescription
errorThe error message for a field key
errorState'invalid' if there is an error, null if there is no error
submittedresponse
1.0.0

5 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago