Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set max length on text input fields #660

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ class SaveOauthClientCredentialClientCommand implements SaveEntityCommandInterfa
#[SpDashboardAssert\ValidClientId]
#[SpDashboardAssert\UniqueEntityId]
#[Assert\NotBlank]
#[Assert\Length(max: 300)]
private ?string $entityId = null;

#[Assert\Length(max: 300)]
private ?string $secret = null;

private ?bool $isPublicClient = null;
Expand All @@ -77,6 +79,7 @@ class SaveOauthClientCredentialClientCommand implements SaveEntityCommandInterfa
#[SpDashboardAssert\ValidLogo()]
#[Assert\Url]
#[Assert\NotBlank]
#[Assert\Length(max: 255)]
private $logoUrl;

/**
Expand All @@ -90,12 +93,14 @@ class SaveOauthClientCredentialClientCommand implements SaveEntityCommandInterfa
* @var string
*/
#[Assert\NotBlank]
#[Assert\Length(max: 255)]
private $nameNl;

/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Length(max: 255)]
private $nameEn;

/**
Expand Down Expand Up @@ -148,6 +153,7 @@ class SaveOauthClientCredentialClientCommand implements SaveEntityCommandInterfa
/**
* @var string
*/
#[Assert\Length(max: 300)]
private $comments;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,13 @@ class SaveOidcngEntityCommand implements SaveEntityCommandInterface
#[SpDashboardAssert\ValidClientId()]
#[SpDashboardAssert\UniqueEntityId()]
#[Assert\NotBlank]
#[Assert\Length(max: 300)]
private ?string $entityId = null;

/**
* @var string
*/
#[Assert\Length(max: 255)]
private $secret;

/**
Expand Down Expand Up @@ -105,6 +107,7 @@ class SaveOidcngEntityCommand implements SaveEntityCommandInterface
#[SpDashboardAssert\ValidLogo()]
#[Assert\Url]
#[Assert\NotBlank]
#[Assert\Length(max: 255)]
private $logoUrl;

/**
Expand All @@ -118,12 +121,14 @@ class SaveOidcngEntityCommand implements SaveEntityCommandInterface
* @var string
*/
#[Assert\NotBlank]
#[Assert\Length(max: 255)]
private $nameNl;

/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Length(max: 255)]
private $nameEn;

/**
Expand All @@ -144,6 +149,7 @@ class SaveOidcngEntityCommand implements SaveEntityCommandInterface
* @var string
*/
#[Assert\Url]
#[Assert\Length(max: 300)]
private $applicationUrl;

/** @var TypeOfService[] */
Expand All @@ -163,6 +169,7 @@ class SaveOidcngEntityCommand implements SaveEntityCommandInterface
* @var string
*/
#[Assert\Url]
#[Assert\Length(max: 300)]
private $eulaUrl;

/**
Expand Down Expand Up @@ -192,6 +199,7 @@ class SaveOidcngEntityCommand implements SaveEntityCommandInterface
/**
* @var string
*/
#[Assert\Length(max: 300)]
private $comments;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,27 @@ class SaveOidcngResourceServerEntityCommand implements SaveEntityCommandInterfac
#[SpDashboardAssert\ValidClientId]
#[SpDashboardAssert\UniqueEntityId]
#[Assert\NotBlank]
#[Assert\Length(max: 300)]
private ?string $entityId = null;

/**
* @var string
*/
#[Assert\Length(max: 255)]
private $secret;

/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Length(max: 255)]
private $nameNl;

/**
* @var string
*/
#[Assert\NotBlank]
#[Assert\Length(max: 255)]
private $nameEn;

/**
Expand Down Expand Up @@ -113,6 +117,7 @@ class SaveOidcngResourceServerEntityCommand implements SaveEntityCommandInterfac
/**
* @var string
*/
#[Assert\Length(max: 300)]
private $comments;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ class SaveSamlEntityCommand implements SaveEntityCommandInterface
#[SpDashboardAssert\ValidEntityId()]
#[SpDashboardAssert\UniqueEntityId()]
#[Assert\NotBlank]
#[Assert\Length(max: 255)]

private string $entityId;

#[SpDashboardAssert\ValidSSLCertificate()]
Expand All @@ -88,12 +90,15 @@ class SaveSamlEntityCommand implements SaveEntityCommandInterface
#[SpDashboardAssert\ValidLogo()]
#[Assert\Url]
#[Assert\NotBlank]
#[Assert\Length(max: 300)]
private ?string $logoUrl = null;

#[Assert\NotBlank]
#[Assert\Length(max: 255)]
private ?string $nameNl = null;

#[Assert\NotBlank]
#[Assert\Length(max: 255)]
private ?string $nameEn = null;

#[Assert\NotBlank]
Expand All @@ -105,6 +110,7 @@ class SaveSamlEntityCommand implements SaveEntityCommandInterface
private ?string $descriptionEn = null;

#[Assert\Url]
#[Assert\Length(max: 300)]
private ?string $applicationUrl = null;

/** @var TypeOfService[] */
Expand All @@ -121,6 +127,7 @@ class SaveSamlEntityCommand implements SaveEntityCommandInterface
private array $typeOfService = [];

#[Assert\Url]
#[Assert\Length(max: 300)]
private ?string $eulaUrl = null;


Expand All @@ -143,6 +150,7 @@ class SaveSamlEntityCommand implements SaveEntityCommandInterface
)]
private array $attributes = [];

#[Assert\Length(max: 300)]
private ?string $comments = null;

#[Assert\Choice(callback: [Constants::class, 'getValidNameIdFormats'], strict: true)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,18 @@ class Contact implements Stringable
* @var string
*/
#[Assert\NotBlank(groups: ['Default', 'production'])]
#[Assert\Length(max: 150)]
private $firstName;

/**
* @var string
*/
#[Assert\NotBlank(groups: ['Default', 'production'])]
#[Assert\Length(max: 150)]
private $lastName;

#[Assert\NotBlank(groups: ['Default', 'production'])]
#[Assert\Length(max: 200)]
private string|null|array $email = null;

/**
Expand Down
Loading