Skip to content

BootstrapInputNumber bind to nullable short value #5941

Answered by ArgoZhang
Ddd-Jw asked this question in Q&A
Discussion options

You must be logged in to vote

@Ddd-Jw missing Required attribute

public class TestModel
{
    public int TestId { get; set; }

    [Required]
    public short? TestNo { get; set; }
}

BTW: can't input the a in BootstrapInputNumber this is browser behavior.

if you wanna validate a in BootstrapInput you should add Regex attribute. Use regular expressions to determine whether user input is legal.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@Ddd-Jw
Comment options

Comment options

You must be logged in to vote
2 replies
@Ddd-Jw
Comment options

@ArgoZhang
Comment options

Answer selected by Ddd-Jw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Question that needs to be answered
2 participants