mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
Remove validation for last name of users, Resolved: update user details bug (#6904)
* remove validation for last name of users * lint issue --------- Co-authored-by: gsmithun4 <gsmithun4@gmail.com>
This commit is contained in:
parent
8f73f62d82
commit
ebc5b79374
3 changed files with 5 additions and 12 deletions
|
|
@ -483,7 +483,7 @@ export const EventManager = ({
|
|||
options={[
|
||||
{ name: 'CSV', value: 'csv' },
|
||||
{ name: 'Text', value: 'plaintext' },
|
||||
{ name: 'PDF', value: 'pdf' }
|
||||
{ name: 'PDF', value: 'pdf' },
|
||||
]}
|
||||
value={event.fileType ?? 'csv'}
|
||||
search={true}
|
||||
|
|
|
|||
|
|
@ -28,16 +28,10 @@ function SettingsPage(props) {
|
|||
|
||||
const updateDetails = async () => {
|
||||
const firstNameMatch = firstName.match(/^ *$/);
|
||||
const lastNameMatch = lastName.match(/^ *$/);
|
||||
if (firstNameMatch !== null || lastNameMatch !== null) {
|
||||
toast.error(
|
||||
`${firstNameMatch !== null ? 'First name' : ''}${
|
||||
lastNameMatch !== null ? (firstNameMatch !== null ? ' and last name' : 'Last name') : ''
|
||||
} can't be empty!`,
|
||||
{
|
||||
position: 'top-center',
|
||||
}
|
||||
);
|
||||
if (firstNameMatch !== null) {
|
||||
toast.error(`First name can't be empty!`, {
|
||||
position: 'top-center',
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ export class CreateUserDto {
|
|||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@IsNotEmpty()
|
||||
@Transform(({ value }) => sanitizeInput(value))
|
||||
last_name: string;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue