저는 codeignter 프레임 워크를 사용하고 있으며 부트 스트랩 검사기를 사용하여 필드의 유효성을 검사하고 싶습니다. 정규 표현식을 만드는 방법은 무엇입니까? 저는 부트 스트랩 검사기를 사용하고 있습니다.정규 표현식으로 작업
예 1 : 숫자 값만 허용하는 연령 필드를 확인하고 싶습니다.하지만 입력합니다. (점 또는 십진법) 이는 또한 잘못된 것으로 간주됩니다. 어떤 알파벳과 숫자 값 allowed.One 알파벳 I 정기적 expression.In를 원하는 :
These are success scenario:
[email protected]
These are wrong scenario:
[email protected]
[email protected]
[email protected]
Please how we make regular expression:
예 3 : 나는 정규 표현식을 이메일로 원하는 : 2
Success Scenario Examples:
16 ,
20 , 50 , 60
Wrong Scenario Examples:
16.5 , 20.5 , 25.5
I want this will not consist of decimal point.
Here is my code:
professional_age: {
validators: {
lessThan: {
value: 100,
inclusive: true,
message: 'The ages has to be less than or equal to 100'
},
greaterThan: {
value: 15,
inclusive: true,
message: 'The ages has to be greater than or equals to 15'
}
}
}
예 : 이 같은 연령이 원하는 해야합니다.
This is success scenario:
123456d
123d5456
a25d852e
This is wrong scenario:
11233658
에서 찾을 수 있습니다 정기적으로 무엇을 표현 지금까지 시도? – Jerodev
*이 필드에는 한 문자 만 입력해야합니다. * Err. 뭐? 또한 표현을 공유하십시오. –
a-Z0-9가있는 길이는 어느 정도입니까? 검색 할 때 찾지 못했다면 – Andreas