api name length check
parent
28c823bc41
commit
e48ab6ca45
|
@ -484,8 +484,16 @@ export default function UserProfile() {
|
|||
placeholder="Name"
|
||||
value={newApiKeyName}
|
||||
onChange={(e) => setNewApikeyName(e.target.value)}
|
||||
maxLength={Constants.GLOBALS.MAX_USER_API_KEY_NAME_LENGTH}
|
||||
/>
|
||||
}
|
||||
okButtonProps={{
|
||||
disabled:
|
||||
newApiKeyName.length <
|
||||
Constants.GLOBALS.MIN_USER_API_KEY_NAME_LENGTH ||
|
||||
newApiKeyName.length >
|
||||
Constants.GLOBALS.MAX_USER_API_KEY_NAME_LENGTH,
|
||||
}}
|
||||
okText={t("userProfile.button.createApiKey.popconfirm.okText")}
|
||||
cancelText={t("common.button.cancel")}
|
||||
onConfirm={() => onCreateNewApiKeyConfirm()}
|
||||
|
|
|
@ -104,6 +104,8 @@ export const Constants = {
|
|||
MAX_LOG_MANAGER_ADDRESS_LENGTH: 100,
|
||||
MIN_ROBOTICS_ROBOT_NAME_LENGTH: 2,
|
||||
MAX_ROBOTICS_ROBOT_NAME_LENGTH: 30,
|
||||
MIN_USER_API_KEY_NAME_LENGTH: 2,
|
||||
MAX_USER_API_KEY_NAME_LENGTH: 30,
|
||||
},
|
||||
MAX_AVATAR_SIZE: 5 * 1024 * 1024,
|
||||
ACCEPTED_AVATAR_FILE_TYPES: [
|
||||
|
|
Loading…
Reference in New Issue