Skip to content

Commit 8bb532c

Browse files
authored
Validate the cmdlet parameter. (#15372)
1 parent 4917dcf commit 8bb532c

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

tools/Az.Tools.Predictor/Az.Tools.Predictor/Commands/SendAzPredictorRating.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,7 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.Azure.PowerShell.Tools.AzPredictor.Utilities;
16-
using System;
17-
using System.Diagnostics;
18-
using System.Globalization;
19-
using System.IO;
2015
using System.Management.Automation;
21-
using System.Text;
22-
using System.Text.Json;
2316

2417
namespace Microsoft.Azure.PowerShell.Tools.AzPredictor
2518
{
@@ -40,6 +33,7 @@ public sealed class SendAzPredictorRating : BasePSCmdlet
4033
/// <para type="description">The rating of Az Predictor: 1 (poor) - 5 (great).</para>
4134
/// </summary>
4235
[Parameter(Mandatory = true, Position = 0, HelpMessage = "The rating of Az Predictor: 1 (poor) - 5 (great).")]
36+
[ValidateRange(1, 5)]
4337
public int Rating { get; set; }
4438

4539
/// <inheritdoc/>

0 commit comments

Comments
 (0)