Skip to content

Instantly share code, notes, and snippets.

View mrtampan's full-sized avatar
🎯
Focusing

Achmad Rivaldi mrtampan

🎯
Focusing
  • Bekasi, Indonesia
View GitHub Profile
@mrtampan
mrtampan / gist:5cc6799fcda55ccc528d5d78c3e97818
Last active January 20, 2020 19:50
javamail simple sender
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import { required, minLength } from 'vuelidate/lib/validators'
export default {
data() {
return {
username: '',
password: ''
}
},
validations: {
<div class="">
<label >Username</label>
<input type="text" v-model="$v.username.$model">
<small v-if="!$v.username.required">Field is required.</small>
<small v-if="!$v.username.minLength">Username must have at least {{$v.username.$params.minLength.min}} letters</small>
</div>
<div class="">
<label >Password</label>
<input type="text" v-model="$v.password.$model">
<small v-if="!$v.password.required">Field is required.</small>
<template>
<div>
<div class="">
<label >Username</label>
<input type="text" v-model="$v.username.$model">
<small v-if="!$v.username.required">Field is required.</small>
<small v-if="!$v.username.minLength">Username must have at least {{$v.username.$params.minLength.min}} letters</small>
</div>
<div class="">
<label >Password</label>