Git Product home page Git Product logo

Comments (4)

jungdj avatar jungdj commented on June 11, 2024

그룹 이름 변경, 유저네임 변경
#49

// variables.js
// ...
export const RESERVED_ROUTES_USERNAME_EXCEPTIONS = ['auth', 'settings'];

// utils/index.js 
// ...
export const validateName = (name) => {
  // 1~25자 제한
  if (name.length === 0 || name.length > 25) return false;
  // 첫 글자로는 _, 알파벳, 한글, 숫자만 입력 가능
  // ._- 한글 알파벳 숫자 입력 가능
  const patt = new RegExp (/^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9_][ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9._-]*$/);
  if (!patt.test (name)) return false;
  const doubleCharPatt = /(--)|(\.\.)|(__)/;
  if (doubleCharPatt.test (name)) return false;
  const match = RESERVED_ROUTES_USERNAME_EXCEPTIONS.find (exception => exception === name.toLowerCase ());
  return !match;
};

요거 쓰면 됨

from zabo-front-reactjs.

jungdj avatar jungdj commented on June 11, 2024

RESERVED_ROUTES_USERNAME_EXCEPTIONS에 'admin' 추가

from zabo-front-reactjs.

jungdj avatar jungdj commented on June 11, 2024

sparcs-kaist/zabo-server-nodejs#33

from zabo-front-reactjs.

Choiyounseo avatar Choiyounseo commented on June 11, 2024

validate 함수 적용 완료

from zabo-front-reactjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.