Skip links

  • Skip to primary navigation
  • Skip to content
  • Skip to footer
WHY 소소한 일상 기록
  • Categories
  • Tags
  • Posts
    1. Home
    2. /
    3. Vue
    4. /
    5. Vue, 유효성 검사

    봄이오면

    집에가고싶다

    • Seoul, Korea

    Vue, 유효성 검사

    Contents

    • 이메일 유효성 체크 정규식

    이메일 유효성 체크 정규식

    Html

    <b-form-input type="email" :state="emailValidation"></b-form-input>
    

    Script

    computed: {
        emailValidation() {
            let re = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
            return re.test(this.userItems.id);
        }
    }
    

    Tags: email, javascript, validation, vue

    Categories: Vue

    Updated: December 24, 2019

    Twitter Facebook LinkedIn
    Previous Next

    You May Also Enjoy

    Swagger, api 숨기기

    API중에 외부에 노출시키고 싶지 않은 API는 숨길수 있다. @Api(hidden = true)

    MongoDB, $type을 사용한 null값 조회

    필드값이 null인 데이터를 조회할때 아래와 같이 하면 필드가 없는 데이터도 조회가 된다. .find({ "field": null })

    MongoDB, 필드를 제거하는 방법

    { title: 'How to remove field in MongoDB' comment: [ id: 'a', name: 'A' ] }

    Exception, com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field

    아래와 같이 json파일을 읽어 Entity 클래스에 바인드시킬때 오류가 발생 ObjectMapper mapper = new ObjectMapper(); Entity entity = mapper.readValue(ResourceUtils.getFile("classpath:data/...

    • Feed
    © 2021 springcome. Powered by Jekyll & Minimal Mistakes.